由于以下错误,我无法创建新的虚拟环境:
$ virtualenv env
New python executable in env/bin/python
Installing distribute....done.
Complete output from command /var/www/vhosts/example.com/...ython /var/www/vhosts/example.com/...stall /usr/lib/pymodules/python2.6/v...ar.gz:
error: Not a URL, existing file, or requirement spec: '/usr/lib/pymodules/python2.6/virtualenv_support/pip-0.6.3.tar.gz'
----------------------------------------
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 9, in <module>
load_entry_point('virtualenv==1.4.5', 'console_scripts', 'virtualenv')()
File "/usr/lib/pymodules/python2.6/virtualenv.py", line 537, in main
use_setuptools=options.use_setuptools)
File "/usr/lib/pymodules/python2.6/virtualenv.py", line 630, in create_environment
install_pip(py_executable)
File "/usr/lib/pymodules/python2.6/virtualenv.py", line 390, in install_pip
filter_stdout=_filter_setup)
File "/usr/lib/pymodules/python2.6/virtualenv.py", line 598, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /var/www/vhosts/example.com/...ython /var/www/vhosts/example.com/...stall /usr/lib/pymodules/python2.6/v...ar.gz failed with error code 1
我已经在网上搜索过但无法找到解决此问题的方法。我正在使用Ubuntu 10.04.4 LTS与Python 2.6.5和Virtualenv 1.7.2,任何帮助赞赏。 :)
答案 0 :(得分:3)
我自己想通了:我尝试用apt-get install python-virtualenv
安装virtualenv。
执行apt-get purge python-virtualenv && easy_install virtualenv
解决了这个问题。
答案 1 :(得分:0)
我看到了同样的问题,我通过“easy_install”而不是“apt-get”安装了“python-virtualenv”。