I want to learn Django so for that, as per the instructions on the website, you need to create a virtual environment. I've heard enough horror stories about people corrupting their OS cause they didn't set up the virtual environments properly so it's safe to say I'm sufficiently paranoid.
I've created a separate folder/directory VirtualE at located at Academics/CS/VirtualENV and I want to create all my virtual environments there. As per the website, the following command should be used -
virtualenv --python=`which python3` ~/.virtualenvs/djangodev
I'm not sure what exactly I should write in place of the single quotes (the which python3 part). I wrote the following -
virtualenv --python=3.5.2 ~/Academics/CS/VirtualENV/DjangoDev
It says
The path 3.5.2 (from --python=3.5.2) does not exist
Where exactly am I going wrong?
解决方案
In the command line, type "which python3" and it will give you the path to python3. You just need to copy and paste that in the command. For example:
virtualenv --python=/path/to/python3/bin/python ~/Academics/CS/VirtualENV/DjangoDev
博主想学习Django,需创建Python虚拟环境,在Academics/CS/VirtualENV目录下操作,使用命令创建时不确定单引号内内容,输入版本号报错。解决方案是在命令行输入“which python3”获取路径,复制到命令中。
826

被折叠的 条评论
为什么被折叠?



