0
我安裝的virtualenv我的系統上,但是當我想真正創建一個虛擬環境中,我得到了以下錯誤:的Python的virtualenv導入錯誤:沒有模塊名爲_vendor
...
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
任何建議,爲什麼會失敗?