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 --versionshould now show this new version - no need to usepython3to createvirualenvetc.) After this, createvirtualenvand 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
brewcan cause some issues. Check the latest instructions here. - Common build problems (for e.g., on Linux).