Virtualenv安装程序返回ImportError

时间:2017-02-16 12:29:17

标签: python tensorflow virtualenv python-3.5

我正在尝试使用virtualenv安装tensorflow,但是当我运行" virtualenv --system-site-packages tensorflow"时,我收到以下错误。我目前正在使用python3.5在macOS上工作。

Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
  File "~/tensorflow/lib/python3.5/tempfile.py", line 45, in <module>
    from random import Random as _Random
ImportError: cannot import name 'Random'
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/bin/virtualenv", line 11, in <module>
sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/virtualenv.py", line 713, in main
symlink=options.symlink)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/virtualenv.py", line 945, in create_environment
download=download,
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/virtualenv.py", line 901, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/virtualenv.py", line 797, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/tensorflow/bin/python3.5 - setuptools pip wheel failed with error code 1

0 个答案:

没有答案