Why can't use the newly installed TensorFlow library using python 3? -
this question has answer here:
i upgraded python 3.5 , trying use tensorflow. followed instructions https://www.tensorflow.org/versions/r0.10/get_started/os_setup.html , installed tensorflow gpu enabled:
# mac os x, gpu enabled, python 3.4 or 3.5: $ export tf_binary_url=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.10.0rc0-py3-none-any.whl however, when tried using tensorflow threw strange error:
>>> import tensorflow traceback (most recent call last): file "<stdin>", line 1, in <module> file "/users/user/path/venv2/lib/python3.5/site-packages/tensorflow/__init__.py", line 23, in <module> tensorflow.python import * file "/users/user/path/venv/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 48, in <module> tensorflow.python import pywrap_tensorflow file "/users/user/path/venv/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module> _pywrap_tensorflow = swig_import_helper() file "/users/user/path/venv/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description) file "/users/user/path/venv/lib/python3.5/imp.py", line 242, in load_module return load_dynamic(name, filename, file) file "/users/user/path/venv/lib/python3.5/imp.py", line 342, in load_dynamic return _load(spec) importerror: dlopen(/users/user/path/venv/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): library not loaded: @rpath/libcudart.7.5.dylib referenced from: /users/user/path/venv/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow.so reason: image not found why throwing error? know not have gpu under impression other conversation on tensorflow page don't require 1 use version can potentially use gpu.
you need export path folder of cuda dylibs (like libcudart) export dyld_library_path in ~/.bash_profile
Comments
Post a Comment