Python - Pyenv
·1 min
Manage multiple versions of Python:
- Install pyenv:
- Mac:
brew install pyenv
- Others:
curl https://pyenv.run | zsh
- Mac:
- Install a particular Python version:
pyenv install 3.6
- Set a particular Python version in shell:
pyenv shell 3.6.9
. (python --version
should now show this new version - no need to usepython3
to createvirualenv
etc.) After this, createvirtualenv
and open project in PyCharm. - Set globally:
pyenv global 3.8.0
- List all installed via pyenv:
pyenv versions
- Unset:
pyenv shell --unset
Troubleshooting:
- Upgrading via
brew
can cause some issues. Check the latest instructions here. - Common build problems (for e.g., on Linux).