2

我有一个使用 virtualenvwrapper 来创建 virtualenv 的结构脚本,但是在运行 mkvirutalenv 之后,结构脚本抱怨返回代码,见下文

[localhost] run: export WORKON_HOME=/srv/www && source /usr/local/bin/virtualenvwrapper.sh && mkvirtualenv james --no-site-packages --distribute
[localhost] Login password for 'james': 
[localhost] out: New python executable in james/bin/python
[localhost] out: Installing distribute...........................................................................................................................................................................................................................done.
[localhost] out: Installing pip................done.


Fatal error: run() received nonzero return code 1 while executing!

Requested: export WORKON_HOME=/srv/www && source /usr/local/bin/virtualenvwrapper.sh && mkvirtualenv james --no-site-packages --distribute
Executed: /bin/bash -l -c "cd /srv/www && export WORKON_HOME=/srv/www && source /usr/local/bin/virtualenvwrapper.sh && mkvirtualenv james --no-site-packages --distribute"

Aborting.
4

1 回答 1

1

发现 --no-site-packages 和 --distribute 的位置必须在 virtualenv 名称前面才能返回 0,例如

mkvirtualenv --no-site-packages --distribute <name>
于 2013-03-20T23:56:02.067 回答