{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/pip/issues/3862","repository_url":"https://api.github.com/repos/pypa/pip","labels_url":"https://api.github.com/repos/pypa/pip/issues/3862/labels{/name}","comments_url":"https://api.github.com/repos/pypa/pip/issues/3862/comments","events_url":"https://api.github.com/repos/pypa/pip/issues/3862/events","html_url":"https://github.com/pypa/pip/issues/3862","id":166893075,"number":3862,"title":"Attempting to upgrade pip to a specific version fails with an AttributeError","user":{"login":"maxrothman","id":2607086,"avatar_url":"https://avatars.githubusercontent.com/u/2607086?v=3","gravatar_id":"","url":"https://api.github.com/users/maxrothman","html_url":"https://github.com/maxrothman","followers_url":"https://api.github.com/users/maxrothman/followers","following_url":"https://api.github.com/users/maxrothman/following{/other_user}","gists_url":"https://api.github.com/users/maxrothman/gists{/gist_id}","starred_url":"https://api.github.com/users/maxrothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxrothman/subscriptions","organizations_url":"https://api.github.com/users/maxrothman/orgs","repos_url":"https://api.github.com/users/maxrothman/repos","events_url":"https://api.github.com/users/maxrothman/events{/privacy}","received_events_url":"https://api.github.com/users/maxrothman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-21T18:59:18Z","updated_at":"2016-11-09T08:38:27Z","closed_at":null,"body":"- Pip version: 8.1.1\n- Python version: 2.7.12\n- Operating System: Ubuntu 16.0.4\n### Description:\n\nWhen running `pip install --upgrade pip==8.1.2`, the command fails with an AttributeError. When running `pip install --upgrade pip`, the command succeeds and installs pip 8.1.2.\n### What I've run:\n\n```\n# Start with a bare Ubuntu 16.04 box, e.g. an EC2 instance from ami-32f43a5f, running as root\n$ apt-get install python-pip\n...snip...\n$ python --version\n2.7.12\n$ pip --version\npip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)\n$ pip install --upgrade pip==8.1.2\nException:\nTraceback (most recent call last):\n  File \"/usr/lib/python2.7/dist-packages/pip/basecommand.py\", line 209, in main\n    status = self.run(options, args)\n  File \"/usr/lib/python2.7/dist-packages/pip/commands/install.py\", line 328, in run\n    wb.build(autobuilding=True)\n  File \"/usr/lib/python2.7/dist-packages/pip/wheel.py\", line 748, in build\n    self.requirement_set.prepare_files(self.finder)\n  File \"/usr/lib/python2.7/dist-packages/pip/req/req_set.py\", line 360, in prepare_files\n    ignore_dependencies=self.ignore_dependencies))\n  File \"/usr/lib/python2.7/dist-packages/pip/req/req_set.py\", line 448, in _prepare_file\n    req_to_install, finder)\n  File \"/usr/lib/python2.7/dist-packages/pip/req/req_set.py\", line 387, in _check_skip_installed\n    req_to_install.check_if_exists()\n  File \"/usr/lib/python2.7/dist-packages/pip/req/req_install.py\", line 1011, in check_if_exists\n    self.req.project_name\nAttributeError: 'Requirement' object has no attribute 'project_name'\nYou are using pip version 8.1.1, however version 8.1.2 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\n$ pip install --upgrade pip\nCollecting pip\n  Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)\n    100% |████████████████████████████████| 1.2MB 548kB/s\nInstalling collected packages: pip\n  Found existing installation: pip 8.1.1\n    Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr\nSuccessfully installed pip-8.1.2\n```\n"},"comment":{"url":"https://api.github.com/repos/pypa/pip/issues/comments/259359829","html_url":"https://github.com/pypa/pip/issues/3862#issuecomment-259359829","issue_url":"https://api.github.com/repos/pypa/pip/issues/3862","id":259359829,"user":{"login":"PyDeq","id":7268060,"avatar_url":"https://avatars.githubusercontent.com/u/7268060?v=3","gravatar_id":"","url":"https://api.github.com/users/PyDeq","html_url":"https://github.com/PyDeq","followers_url":"https://api.github.com/users/PyDeq/followers","following_url":"https://api.github.com/users/PyDeq/following{/other_user}","gists_url":"https://api.github.com/users/PyDeq/gists{/gist_id}","starred_url":"https://api.github.com/users/PyDeq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyDeq/subscriptions","organizations_url":"https://api.github.com/users/PyDeq/orgs","repos_url":"https://api.github.com/users/PyDeq/repos","events_url":"https://api.github.com/users/PyDeq/events{/privacy}","received_events_url":"https://api.github.com/users/PyDeq/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T08:38:27Z","updated_at":"2016-11-09T08:38:27Z","body":"Interesting. In my case, I am running pip from a virtualenv. Moreover, I don't have `python-pip` nor `python3-pip` installed. Can the Ubuntu patching affect this anyway?"}}
{"actor":{"display_login":"PyDeq"}}