{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/pipenv/issues/1761","repository_url":"https://api.github.com/repos/pypa/pipenv","labels_url":"https://api.github.com/repos/pypa/pipenv/issues/1761/labels{/name}","comments_url":"https://api.github.com/repos/pypa/pipenv/issues/1761/comments","events_url":"https://api.github.com/repos/pypa/pipenv/issues/1761/events","html_url":"https://github.com/pypa/pipenv/issues/1761","id":305865565,"number":1761,"title":"Python3 only on macos: `pipenv --update` fails about missing `pip` module","user":{"login":"gsemet","id":133498,"avatar_url":"https://avatars1.githubusercontent.com/u/133498?v=4","gravatar_id":"","url":"https://api.github.com/users/gsemet","html_url":"https://github.com/gsemet","followers_url":"https://api.github.com/users/gsemet/followers","following_url":"https://api.github.com/users/gsemet/following{/other_user}","gists_url":"https://api.github.com/users/gsemet/gists{/gist_id}","starred_url":"https://api.github.com/users/gsemet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsemet/subscriptions","organizations_url":"https://api.github.com/users/gsemet/orgs","repos_url":"https://api.github.com/users/gsemet/repos","events_url":"https://api.github.com/users/gsemet/events{/privacy}","received_events_url":"https://api.github.com/users/gsemet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"gsemet","id":133498,"avatar_url":"https://avatars1.githubusercontent.com/u/133498?v=4","gravatar_id":"","url":"https://api.github.com/users/gsemet","html_url":"https://github.com/gsemet","followers_url":"https://api.github.com/users/gsemet/followers","following_url":"https://api.github.com/users/gsemet/following{/other_user}","gists_url":"https://api.github.com/users/gsemet/gists{/gist_id}","starred_url":"https://api.github.com/users/gsemet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsemet/subscriptions","organizations_url":"https://api.github.com/users/gsemet/orgs","repos_url":"https://api.github.com/users/gsemet/repos","events_url":"https://api.github.com/users/gsemet/events{/privacy}","received_events_url":"https://api.github.com/users/gsemet/received_events","type":"User","site_admin":false},"assignees":[{"login":"gsemet","id":133498,"avatar_url":"https://avatars1.githubusercontent.com/u/133498?v=4","gravatar_id":"","url":"https://api.github.com/users/gsemet","html_url":"https://github.com/gsemet","followers_url":"https://api.github.com/users/gsemet/followers","following_url":"https://api.github.com/users/gsemet/following{/other_user}","gists_url":"https://api.github.com/users/gsemet/gists{/gist_id}","starred_url":"https://api.github.com/users/gsemet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsemet/subscriptions","organizations_url":"https://api.github.com/users/gsemet/orgs","repos_url":"https://api.github.com/users/gsemet/repos","events_url":"https://api.github.com/users/gsemet/events{/privacy}","received_events_url":"https://api.github.com/users/gsemet/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-03-16T09:58:13Z","updated_at":"2018-03-16T10:11:34Z","closed_at":null,"author_association":"COLLABORATOR","body":"I only have Python 3 on my mac, and do not have a `pip` command available. Only pip3. I think the official transition to `pip` as an alias to `pip3` hasn't been made yet (current PEP is [PEP394](https://www.python.org/dev/peps/pep-0394/) I guess)\r\n\r\nSo we I do a `pipenv --update`, I get this result:\r\n```\r\n$ pipenv --update\r\nCourtesy Notice: Pipenv 11.8.0 is now available. Automatically upgrading!\r\nTraceback (most recent call last):\r\n  File \"/Users/gaetan/Library/Python/3.6/bin//pipenv\", line 11, in <module>\r\n    sys.exit(cli())\r\n  File \"/Users/gaetan/Library/Python/3.6/lib/python/site-packages/pipenv/vendor/click/core.py\", line 722, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/Users/gaetan/Library/Python/3.6/lib/python/site-packages/pipenv/vendor/click/core.py\", line 697, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/Users/gaetan/Library/Python/3.6/lib/python/site-packages/pipenv/vendor/click/core.py\", line 1043, in invoke\r\n    return Command.invoke(self, ctx)\r\n  File \"/Users/gaetan/Library/Python/3.6/lib/python/site-packages/pipenv/vendor/click/core.py\", line 895, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/Users/gaetan/Library/Python/3.6/lib/python/site-packages/pipenv/vendor/click/core.py\", line 535, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/Users/gaetan/Library/Python/3.6/lib/python/site-packages/pipenv/vendor/click/decorators.py\", line 17, in new_func\r\n    return f(get_current_context(), *args, **kwargs)\r\n  File \"/Users/gaetan/Library/Python/3.6/lib/python/site-packages/pipenv/cli.py\", line 71, in cli\r\n    core.ensure_latest_self()\r\n  File \"/Users/gaetan/Library/Python/3.6/lib/python/site-packages/pipenv/core.py\", line 171, in ensure_latest_self\r\n    sys.modules['pip'].main(args)\r\nKeyError: 'pip'\r\n```\r\n\r\nThe following commands work:\r\n```\r\n$ pip3\r\n$ python3 -m pip\r\n$ python3 -m pip install --upgrade pipenv\r\n```\r\n\r\nBut these do not, obviously:\r\n```bash\r\n$ pip\r\ncommand not found: pip\r\n$ python -m pip\r\n/usr/bin/python: No module named pip\r\n```\r\n\r\nSo to upgrade pipenv I usually do:\r\n```bash\r\n$ pip3 install --upgrade pipenv\r\n```\r\n\r\nNot sure why `pipenv --`upgrade` complains about the module `pip` missing, I see it uses Python3 interpreter and the code should be similar to `python3 -m pip`.\r\n\r\nSo I'd like to propose a fallback mecanism, where it detect which version of python it is under and call the executable `python -m pip install --upgrade pipenv` or `python3 -m pip install --upgrade pipenv`."},"comment":{"url":"https://api.github.com/repos/pypa/pipenv/issues/comments/373666406","html_url":"https://github.com/pypa/pipenv/issues/1761#issuecomment-373666406","issue_url":"https://api.github.com/repos/pypa/pipenv/issues/1761","id":373666406,"user":{"login":"uranusjr","id":605277,"avatar_url":"https://avatars1.githubusercontent.com/u/605277?v=4","gravatar_id":"","url":"https://api.github.com/users/uranusjr","html_url":"https://github.com/uranusjr","followers_url":"https://api.github.com/users/uranusjr/followers","following_url":"https://api.github.com/users/uranusjr/following{/other_user}","gists_url":"https://api.github.com/users/uranusjr/gists{/gist_id}","starred_url":"https://api.github.com/users/uranusjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uranusjr/subscriptions","organizations_url":"https://api.github.com/users/uranusjr/orgs","repos_url":"https://api.github.com/users/uranusjr/repos","events_url":"https://api.github.com/users/uranusjr/events{/privacy}","received_events_url":"https://api.github.com/users/uranusjr/received_events","type":"User","site_admin":false},"created_at":"2018-03-16T10:11:34Z","updated_at":"2018-03-16T10:11:34Z","author_association":"COLLABORATOR","body":"I don’t think the two are related. `sys.modules['pip']` looks for a (already imported) module named pip, not a command."}}
{"actor":{"display_login":"uranusjr"}}