【发布时间】:2016-11-26 19:47:44
【问题描述】:
在遵循 tensorflow 的 Mac GPU 安装说明并从源代码构建包后运行 python -c "import tensorflow" 时,我得到了
dyld: warning, LC_RPATH $ORIGIN/../../_solib_darwin/_U_S_Sthird_Uparty_Sgpus_Scuda_Ccudart___Uthird_Uparty_Sgpus_Scuda_Slib in /Library/Python/2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so being ignored in restricted program because it is a relative path
dyld: warning, LC_RPATH third_party/gpus/cuda/lib in /Library/Python/2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so being ignored in restricted program because it is a relative path
dyld: warning, LC_RPATH third_party/gpus/cuda/extras/CUPTI/lib in /Library/Python/2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so being ignored in restricted program because it is a relative path
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Library/Python/2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/Library/Python/2.7/site-packages/tensorflow/python/__init__.py", line 48, in <module>
from tensorflow.python import pywrap_tensorflow
File "/Library/Python/2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 21, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/Library/Python/2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named _pywrap_tensorflow
我已经尝试重建包几次,并确保在 tensorflow 源目录之外运行 python 命令,但被卡住了。
提前感谢您提供有关如何解决此问题的任何想法。
【问题讨论】:
-
mac GPU版本的说明在哪里?
-
您解决了这个问题吗?谢谢
-
现在很确定问题是我的英特尔显卡不支持 CUDA。据我所知,您需要一张 NVIDIA 卡才能运行 tensorflow
标签: python macos tensorflow nvidia dyld