2012-10-25 167 views
1
$ sudo virtualenv test 
Password: 
Sorry, try again. 
Password: 
New python executable in test/bin/python 
Installing setuptools.............done. 
Installing pip.... 
    Complete output from command /Users/hhimanshu/test/bin/python -x /Users/hhimanshu/test/bin/easy_install /Library/Python/2.7/...ort/pip-1.2.1.tar.gz: 
    /Users/hhimanshu/test/bin/python: can't open file '/Users/hhimanshu/test/bin/easy_install': [Errno 2] No such file or directory 
---------------------------------------- 
...Installing pip...done. 
Traceback (most recent call last): 
    File "/usr/local/bin/virtualenv", line 8, in <module> 
    load_entry_point('virtualenv==1.8.2', 'console_scripts', 'virtualenv')() 
    File "/Library/Python/2.7/site-packages/virtualenv.py", line 942, in main 
    never_download=options.never_download) 
    File "/Library/Python/2.7/site-packages/virtualenv.py", line 1054, in create_environment 
    install_pip(py_executable, search_dirs=search_dirs, never_download=never_download) 
    File "/Library/Python/2.7/site-packages/virtualenv.py", line 655, in install_pip 
    filter_stdout=_filter_setup) 
    File "/Library/Python/2.7/site-packages/virtualenv.py", line 1020, in call_subprocess 
    % (cmd_desc, proc.returncode)) 
OSError: Command /Users/hhimanshu/test/bin/python -x /Users/hhimanshu/test/bin/easy_install /Library/Python/2.7/...ort/pip-1.2.1.tar.gz failed with error code 2 

回答

1

您是如何安裝virtualenv?這適用於我使用顯式路徑:

sudo /usr/bin/easy_install-2.7 virtualenv 
/usr/local/bin/virtualenv-2.7 test