[英]Python virtualenv ImportError: No module named _vendor
I installed virtualenv on my system but when I want to actually create a virtual environment I get the following error: 我在系统上安装了virtualenv,但是当我想实际创建虚拟环境时,出现以下错误:
...
Successfully installed virtualenv-15.0.3
$ virtualenv venv
New python executable in /Users/.../venv/bin/python
Installing setuptools, pip, wheel...
Complete output from command /Users/.../venv/bin/python - setuptools pip wheel:
Traceback (most recent call last):
File "<stdin>", line 9, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 578, in get_data
loader = get_loader(package)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 464, in get_loader
return find_loader(fullname)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 474, in find_loader
for importer in iter_importers(fullname):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 430, in iter_importers
__import__(pkg)
ImportError: No module named _vendor
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 11, in <module>
sys.exit(main())
File "/Library/Python/2.7/site-packages/virtualenv.py", line 711, in main
symlink=options.symlink)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 944, in create_environment
download=download,
File "/Library/Python/2.7/site-packages/virtualenv.py", line 900, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 795, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/.../venv/bin/python - setuptools pip wheel failed with error code 1
Any suggestions why this fails? 有什么建议为什么会失败吗?
This seems to be a problem with pip
in combination with the native OS X version of Python. 与本地OS X版本的Python结合使用时,
pip
似乎是一个问题。 I downloaded python from https://www.python.org/ and was able to install pip
and virtualenv
properly. 我从https://www.python.org/下载了python,并且能够正确安装
pip
和virtualenv
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.