0

As answered here, virtualenv has -p and --python flags that allow user to define python interpreter desired version to be used in the to-be-created virtual environment

Reading up venv official doc, I haven't found such an option described. So I'm look for an alternative to achieve same behavior. Some guess?

artu-hnrq
  • 1,343
  • 1
  • 8
  • 30
  • 2
    Does this answer your question? [How do I use different Python version in venv from standard library? (Not virtualenv!)](https://stackoverflow.com/q/22681824/2745495) – Gino Mempin Jan 29 '21 at 23:12

1 Answers1

1

Try running: py -3.8 -m venv virtualenv. This is the method I’ve been using which does create a virtual environment in the corresponding Python version. There may be other methods, however. Naturally, replace py3.8 with whoever version you want to use.

Jacob Lee
  • 4,405
  • 2
  • 16
  • 37