4 ms·
You're missing that venv and virtualenv can't do that: they can only create environments for your current Python interpreter, not arbitrary Python versions. Th
by woodruffw 4y ago
You're missing that venv and virtualenv can't do that: they can only create environments for your current Python interpreter, not arbitrary Python versions.
There's no flag that I'm aware of that makes venv install a different Python version than the one it was invoked with.
- aiiane 4y agoThe --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.
- georgyo 4y agoGetting another python executable is normal the challenge though.
- actually_a_dog 4y agoNot 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.)
- KyeRussell 4y agoAnd pyenv is a wrapper around “downloading the source and compiling it”.
- 1_1xdev1 4y agoBrew 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
- InvaderFizz 4y agoThe version pinning on brew certainly isn't great, but you can do: > brew install python@3.9 python@3.10 python@3.11