使用OS X使用virtualenv创建vritualenv的问题

时间:2010-07-04 02:09:18

标签: python virtualenv

所以我不确定我的问题是什么。试图配置virtualenv这是我得到的错误:

20:59:51 $ virtualenv test -p / usr / local / bin / python

Running virtualenv with interpreter /usr/local/bin/python
New python executable in test/bin/python
Please make sure you remove any previous custom paths from your /Users/nlang/.pydistutils.cfg file.
Overwriting test/lib/python2.6/distutils/__init__.py with new content
Installing setuptools...............done.
  Complete output from command /Users/nlang/Code/Python/venvs...ython /Users/nlang/Code/Python/venvs...stall /Library/Python/2.6/site-packa...ar.gz:
  /Users/nlang/Code/Python/venvs/test/bin/python: can't open file '/Users/nlang/Code/Python/venvs/test/bin/easy_install': [Errno 2] No such file or directory
----------------------------------------
Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/virtualenv-1.4.9-py2.6.egg/virtualenv.py", line 1489, in <module>
    main()
  File "/Library/Python/2.6/site-packages/virtualenv-1.4.9-py2.6.egg/virtualenv.py", line 526, in main
    use_distribute=options.use_distribute)
  File "/Library/Python/2.6/site-packages/virtualenv-1.4.9-py2.6.egg/virtualenv.py", line 618, in create_environment
    install_pip(py_executable)
  File "/Library/Python/2.6/site-packages/virtualenv-1.4.9-py2.6.egg/virtualenv.py", line 390, in install_pip
    filter_stdout=_filter_setup)
  File "/Library/Python/2.6/site-packages/virtualenv-1.4.9-py2.6.egg/virtualenv.py", line 587, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /Users/nlang/Code/Python/venvs...ython /Users/nlang/Code/Python/venvs...stall /Library/Python/2.6/site-packa...ar.gz failed with error code 2

我在各种论坛和谷歌上搜索过,但是在创建virtualenv方面却没有成功。我卡住了:(

由于

1 个答案:

答案 0 :(得分:0)

很难确切地说明截断输出提供了什么,但看起来您正在尝试更新现有虚拟环境(请注意Overwriting消息)。首先,验证/usr/local/bin/python处的python是否可以正常工作。然后,尝试在新的(不存在的)目录(test以外的其他目录)中创建virtualenv。如果这不起作用,请编辑您的问题以添加两者的输出。