Hacker News new | ask | show | jobs
by aiiane 1205 days ago
The --python flag for virtualenv will let you specify a different Python executable to use, but requires that executable to already be installed somewhere on the system.
1 comments

Getting another python executable is normal the challenge though.
Not really. Not under OSX, brew makes this simple. Under Linux, worst case, you just download the source and compile it. (Not sure about Windows though.)
Brew makes this easy? Are you sure? I installed python 3.9 with brew and it’s magically become a 3.10 install by upgrading another package
The version pinning on brew certainly isn't great, but you can do:

> brew install python@3.9 python@3.10 python@3.11

And pyenv is a wrapper around “downloading the source and compiling it”.