Hacker News new | ask | show | jobs
by whichquestion 1429 days ago
Pyenv[1] solves the multiple versions of python problem in my experience. You can install the version of python you want and then can set that version globally, per directory, and then use that versions pip or take it further and use a virtualenv/poetry shell.

1: https://github.com/pyenv/pyenv

3 comments

Not to be confused with pipenv!
asdf works as a universal tool for any cli app i.e. python, terraform, ruby, golang, etc

https://github.com/asdf-vm/asdf

    asdf plugin add python

    asdf install python 3.9.1

    asdf global python 3.9.1

    asdf local python 3.9.1
This!

I use a combination pyenv, direnv and poetry for my projects.