How to specify python version used to create Virtual Environment?(如何指定用于创建虚拟环境的 python 版本?)
问题描述
My Python virtual environments use python3.6
when I create them using virtualenv
~ $ virtualenv my_env
but I need to use python3.5
as 3.6 is not currently supported by Opencv3
.
I've tried using the --python=<py_version>
flag when creating a virtual environment but this doesn't work.
How do I specify the python (3.x) version to install using virtualenv
for Mac and/or Linux?
Assuming that you have installed python3
or any desired version of Python (2.6, 2.7, 3.5, 3.6), Now while creating the virtual environment directly pass the python executable path. Hence here are few valid example
And last
这篇关于如何指定用于创建虚拟环境的 python 版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!