virtualenv allows you to set a specific Python version to use, e.g.:
virtualenv --python=python3.8 venv
I guess that virtualenv takes the selected Python interpreter for the system where it runs so you cannot put whatever you want as value for --python
setting.
However, is there any way to know a priori which interpreters you have available (i.e. which values you can use for --python
)? Something like virtualenv --list-interpreters
(I have had a look in virtualenv --help
but I haven't found anything like that).