启动Virtualenv OSError

时间:2013-09-22 06:12:20

标签: python virtualenv pip

我正在尝试建立一个虚拟实体。

我跑的时候     $ virtualenv venv

我收到:

New python executable in venv/bin/python
Installing Setuptools.............................................................................................done.
Installing Pip...................
Complete output from command /Users/Marcus/Docume...envs/venv/bin/python setup.py install --single-version-externally-managed --record record:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points'
warnings.warn(msg)
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'extras_require' 
warnings.warn(msg)
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: option --single-version-externally-managed not recognized
----------------------------------------
...Installing Pip...done.
Traceback (most recent call last):
  File "/Users/Marcus/.local/bin/virtualenv", line 9, in <module>
load_entry_point('virtualenv==1.10.1', 'console_scripts', 'virtualenv')()
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 821, in main
symlink=options.symlink)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 963, in create_environment
install_sdist('Pip', 'pip-*.tar.gz', py_executable, search_dirs)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 932, in install_sdist
filter_stdout=filter_install_output)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 899, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/Marcus/Docume...envs/venv/bin/python setup.py install --single-version-externally-managed --record record failed with error code 1

有没有人见过这个?如果是这样,我该如何解决?感谢

额外信息 不确定是否相关

在bashrc中

# pip ---------------------------------------------------------                                                                                                                                                  
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_REQUIRE_VIRTUALENV=false
export PIP_RESPECT_VIRTUALENV=true
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache

0 个答案:

没有答案