所以你可以在这里看到我们有python和anaconda
>>> #python
... import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
ModuleNotFoundError: No module named 'tensorflow'
>>>
然后使用pip3和tfBinaryURL安装Tensorflow,最终测试安装 -
Installing collected packages: tensorflow
Found existing installation: tensorflow 1.3.0
Uninstalling tensorflow-1.3.0:
Exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/shutil.py", line 544, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/external/__pycache__/__init__.cpython-36.pyc' -> '/var/folders/61/1b15w21n0jbc2sndhd3j7xfr0000gn/T/pip-oepk4q_b-uninstall/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/external/__pycache__/__init__.cpython-36.pyc'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/shutil.py", line 559, in move
os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/external/__pycache__/__init__.cpython-36.pyc'
所以我尝试使用pip uninstall tensorflow卸载Tensorflow但是在y / n提示符后再次卸载(键入“y”)
XXXs-MacBook-Pro:~ abi$ virtualenv --system-site-packages -p python3 ~/tensorflow
Running virtualenv with interpreter /Users/abi/anaconda/bin/python3
Using base prefix '/Users/abi/anaconda'
New python executable in /Users/abi/tensorflow/bin/python3
Also creating executable in /Users/abi/tensorflow/bin/python
dyld: Library not loaded: @rpath/libpython3.6m.dylib
Referenced from: /Users/abi/tensorflow/bin/python3
Reason: image not found
ERROR: The executable /Users/abi/tensorflow/bin/python3 is not functioning
ERROR: It thinks sys.prefix is '/Users/abi' (should be '/Users/abi/tensorflow')
ERROR: virtualenv is not compatible with this system or executable
发生了这种情况。
如果它已预先安装,因为理想情况下,程序#1应该可以正常工作 - 但事实并非如此。
这次尝试通过anaconda进行安装,以防问题是由不同版本的Python引起的 -
if (Input.GetKeyDown (KeyCode.Escape)) {
Application.Quit ();
}
你能帮忙吗?
答案 0 :(得分:0)
试试这个,看看:
conda install -c conda-forge tensorflow