Hacker News new | ask | show | jobs
by PopsiclePete 2715 days ago
what works for me

1. brew install pyenv 2. pyenv install 2.7.x 3. pyenv install 3.x 4. cd work; pyenv local 3.7.x (by default, all projects under "work" will use 3.x) 5. cd work/legacy; pyenv local 2.7.x (but this one will be on 2.x)

then for each project, I'll create a separate virtual environment.

For various reasons, I have about 6 separate python versions and a dozen or so mini projects all working flawlessly as separate virtual environments created under separate versions managed by pyenv, and I always have the latest pyenv thanks to brew.