Tôi đang sử dụng OS X El Capitan (10.11.4).'Thư viện không được tải: @ rpath/libcudart.7.5.dylib' Lỗi TensorFlow trên Mac
Tôi vừa tải xuống TensorFlow sử dụng hướng dẫn cài đặt pip here.
Tất cả mọi thứ diễn ra khá suôn sẻ, mặc dù tôi đã có được một vài thông điệp cảnh báo như:
The directory '/Users/myusername/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
và
You are using pip version 6.0.8, however version 8.1.2 is available.
Mặc dù tôi chỉ cần cài đặt pip.
Sau đó, khi tôi thử nghiệm TensorFlow bằng Python, tôi đã nhận lỗi:
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tensorflow/python/__init__.py", line 48, in <module>
from tensorflow.python import pywrap_tensorflow
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): Library not loaded: @rpath/libcudart.7.5.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tensorflow/python/_pywrap_tensorflow.so
Reason: image not found
Bây giờ, khi tôi cố gắng làm pip uninstall tensorflow-0.10.0rc0
nó nói với tôi rằng nó không được cài đặt.
Điều gần nhất tôi thấy giống với vấn đề này là this issue trong tài liệu TensorFlow GitHub (mà tôi chưa thử).
Làm cách nào tôi có thể gỡ cài đặt mọi thứ đã cài đặt và nhận TensorFlow và chạy đúng cách?
Có thể bạn đã cài đặt phiên bản hỗ trợ GPU, nhưng chưa cài đặt CUDA? – mrry
@mrry rất có thể. CUDA là gì? Làm thế nào để cài đặt nó? –
Có phải nó đã cho tôi biết cài đặt CUDA ở đâu đó trong hướng dẫn và tôi đã bỏ lỡ nó? –