3 ms·
For managing versions of Python packages, I take a similar route and keep it simple: python -m venv .venv source .venv/bin/activate pip install -r requir
by divbzero 3y ago
For managing versions of Python packages, I take a similar route and keep it simple:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
However, pyenv addresses a different problem: managing versions of Python itself.
For example, if you need the latest version of Python and it is not available through your OS:
pyenv install 3.12
pyenv global 3.12
- airstrike 3y agoon Mac OS I just do brew install python@3.8 brew install python@3.12 and pick whichever one I want symlinked as `python` and `python3` (I think the last one you install is the one that gets symlinked, but you could always change those links yourself manually) on Linux it should be just as easy to have multiple versions side-by-side it's been a while since I've done something similar on Windows but it's also possible (although I think I would prefer to use WSL if I were on Windows these days)
- divbzero 3y agoSome Linux distros don’t have the latest Python versions in their package repos, but there are definitely other ways to install versions side-by-side.