2

我正在尝试设置一个 virtualenv。

当我运行 $ 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
4

0 回答 0