Skip to content

Instantly share code, notes, and snippets.

@zarzen
Created September 4, 2016 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zarzen/67a859bcca05c1dd2ceaeff85faf5cee to your computer and use it in GitHub Desktop.
Save zarzen/67a859bcca05c1dd2ceaeff85faf5cee to your computer and use it in GitHub Desktop.
MXnet installation
  • Get an error while testing
Traceback (most recent call last):
  File "example/image-classification/train_mnist.py", line 1, in <module>
    import find_mxnet
  File "/Users/zarzen/Development/mxnet/example/image-classification/find_mxnet.py", line 2, in <module>
    import mxnet as mx
  File "/usr/local/lib/python2.7/site-packages/mxnet-0.7.0-py2.7.egg/mxnet/__init__.py", line 7, in <module>
    from .base import MXNetError
  File "/usr/local/lib/python2.7/site-packages/mxnet-0.7.0-py2.7.egg/mxnet/base.py", line 43, in <module>
    _LIB = _load_lib()
  File "/usr/local/lib/python2.7/site-packages/mxnet-0.7.0-py2.7.egg/mxnet/base.py", line 35, in _load_lib
    lib = ctypes.cdll.LoadLibrary(lib_path[0])
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 440, in LoadLibrary
    return self._dlltype(name)
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 362, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/usr/local/lib/python2.7/site-packages/mxnet-0.7.0-py2.7.egg/mxnet/libmxnet.so, 6): Library not loaded: @rpath/libcudart.7.5.dylib
  Referenced from: /usr/local/lib/python2.7/site-packages/mxnet-0.7.0-py2.7.egg/mxnet/libmxnet.so
  Reason: image not found

Someones say we need to disable OSX's SIP, but the simpler way is set DYLD_FALLBACK_LIBRARY_PATH

export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/cuda/lib:/usr/local/lib:/usr/lib:/Developer/NVIDIA/CUDA-7.0/lib

reference: BVLC/caffe#2320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment