Skip to main content

Python - Pyenv

·1 min

Manage multiple versions of Python:

  • Install pyenv:
    • Mac: brew install pyenv
    • Others: curl https://pyenv.run | zsh
  • 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 use python3 to create virualenv etc.) After this, create virtualenv and open project in PyCharm.
  • Set globally: pyenv global 3.8.0
  • List all installed via pyenv: pyenv versions
  • Unset: pyenv shell --unset

Troubleshooting: