Wrong Python inside of 'pipenv shell'
See original GitHub issueInside of the pipenv shell
subshell, I expected python
to point to .venv/bin/python
, but:
$ pipenv --version
pipenv, version 3.3.2
$ pipenv shell
Launching subshell in virtual environment. Type 'exit' or 'Ctrl+D' to return.
$ which python
/Users/Browning/.pyenv/shims/python
$ which -a python
/Users/Browning/.pyenv/shims/python
/Users/Browning/.local/share/virtualenvs/virtualboombox/bin/python
/Users/Browning/.pyenv/versions/3.6.0/bin/python
/Users/Browning/.pyenv/shims/python
/usr/local/bin/python
/usr/bin/python
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (14 by maintainers)
Top Results From Across the Web
pipenv using wrong python with pyenv · Issue #729
pipenv is using python 3.5.3 instead of 3.6.2 for some reason $ pipenv --version ... run the following: $ pipenv shell $ pyenv...
Read more >Why is pipenv telling me the wrong version of python?
It scans your system and looks for a compatible python installation. Now, it seems you already have an existing Pipfile that has "2.7"...
Read more >Frequently Encountered Pipenv Problems - Read the Docs
☤ My pyenv-installed Python is not found Make sure you have PYENV_ROOT set correctly. Pipenv only supports CPython distributions, with version name like...
Read more >Using Python environments in VS Code
Using Python environments in VS Code. This article discusses the helpful Python environments features available in Visual Studio Code. An "environment" in ...
Read more >Pipenv
Create a new project using Python 3.7, specifically: $ pipenv --python 3.7 Remove project virtualenv (inferred from current directory): $ pipenv --rm ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Or maybe you should move
pyenv init
into.bash_profile
instead (I am not sure what is zsh’s equivalent).profile
is for login shells, and only evaluated once;rc
is for non-login shells.pipenv shell
launches non-login shells.@uranusjr This is genius!!
I just tested, it works as expected and feels much cleaner than my version. For reference the
zsh
equivalent of.bash_profile
is.zlogin
: http://zsh.sourceforge.net/Intro/intro_3.htmlThanks for teaching me about login vs interactive shells. I’m switching to your version 👍