Virtualwrapper需要完整的python3路径
问题描述:
为了避免给须藤PIP3安装virtualwrapper安装virtualwrapper在我的Ubuntu用apt:Virtualwrapper需要完整的python3路径
sudo apt-get install virtualenv virtualenvwrapper
当我只使用下面的命令我得到一个Python 2.7的环境:
mkvirtualenv测试
为了使python3环境下突击队不起作用:
[email protected]:~$ mkvirtualenv -p python3 test
The executable /home/test/python3 (from --python=/home/test/python3) does not exist
我才能有python3 environement我必须使用以下突击队:
mkvirtualenv -p /usr/bin/python3 py3
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/test/.vens/py3/bin/python3
Not overwriting existing python script /home/test/.vens/py3/bin/python (you must use /home/test/.vens/py3/bin/python3)
Installing setuptools, pkg_resources, pip, wheel...done.
它为何不工作,使用-p python3命令?
当我使用同样的命令的virtualenv,它的工作原理:
[email protected]:~$ virtualenv -p python3 test2
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/test/test2/bin/python3
Also creating executable in /home/test/test2/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
答
根据你得到的错误,virtualenvwrapper
通过使用当前工作目录的-p
选项virtualenv
。
你应该这样做:
mkvirtualenv -p `which python3` test
+0
谢谢。我现在明白virtualenvwrapper是如何运作的:) – fossekall
什么是你的问题? – vipertherapper
'哪个python3'告诉你什么命令? – davedwards