为现有Django项目设置virtualenv时出错

时间:2011-05-31 17:26:14

标签: django virtualenv

我抓住了我想要玩的项目的源代码,我正在尝试设置virtualenv。我运行的命令是:

. virtualenv

导致:

__requires__: command not found
The program 'import' can be found in the following packages:
 * imagemagick
 * graphicsmagick-imagemagick-compat
Try: sudo apt-get install <selected package>
from: can't read /var/mail/pkg_resources
bash: /usr/local/bin/virtualenv: line 8: syntax error near unexpected token `newline'
bash: /usr/local/bin/virtualenv: line 8: `    sys.exit('

这是Python 2.7.1,virtualenv适用于我的其他项目。

1 个答案:

答案 0 :(得分:1)

请尝试python virtualenv./virtualenv. virtualenv将尝试导入并执行Python脚本作为shell脚本。