TomHeaven / tensorflow-osx-build

Off-the-shelf python package of tensorflow with CUDA support for Mac OS.
142 stars 20 forks source link

Library not loaded: /usr/local/lib/libgomp.1.dylib #6

Closed hudarsono closed 5 years ago

hudarsono commented 5 years ago

I got following error when importing tensorflow : `

import tensorflow as tf Traceback (most recent call last): File "/Users/abc/Sites/tfgpu/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "/Users/abc/Sites/tfgpu/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/Users/abc/Sites/tfgpu/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 343, in load_dynamic return _load(spec) ImportError: dlopen(/Users/abc/Sites/tfgpu/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 6): Library not loaded: /usr/local/lib/libgomp.1.dylib Referenced from: /Users/abc/Sites/tfgpu/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so Reason: image not found

During handling of the above exception, another exception occurred: `

Any idea? I am using this release : https://github.com/TomHeaven/tensorflow-osx-build/releases/download/v1.12.0_cu100/tensorflow-1.12.0-cp36-cp36m-macosx_10_12_x86_64.whl

TomHeaven commented 5 years ago

You need to copy the libs libgomp.1.dylib and libgcc_s.1.dylib to your /usr/local/lib path.

TomHeaven commented 5 years ago

I'm closing the issue since it's solved.