【发布时间】:2017-03-20 02:57:15
【问题描述】:
我的问题与 conda 无关。
~$ virtualenv venv
New python executable in /Users/john/venv/bin/python
Installing setuptools, pip, wheel...
Complete output from command /Users/john/venv/bin/python - setuptools pip wheel:
Traceback (most recent call last):
File "<stdin>", line 7, in <module>
File "/Library/Python/2.7/site-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/__init__.py", line 4, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 26, in <module>
import sys, os, time, cStringIO, traceback, warnings, weakref, collections
File "traceback.py", line 21, in <module>
traceback.print_exception(exc_type, exc_value, exc_traceback, file=f)
AttributeError: 'module' object has no attribute 'print_exception'
----------------------------------------
...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/john/venv/bin/python - setuptools pip wheel failed with error code 1
我也找不到这个文件:文件“traceback.py”,第 21 行,在
任何线索将不胜感激。
【问题讨论】:
-
@Soviut 我与 conda 无关。我根本没有使用它。
-
你查看过抛出的 OSError 吗?好像有点普通
标签: python macos python-2.7 virtualenv macos-sierra