[niranjan@localhost mxnet]$ python example/image-classification/train_mnist.py
Traceback (most recent call last):
File "example/image-classification/train_mnist.py", line 1, in <module>
import find_mxnet
File "/home/niranjan/mxnet/example/image-classification/find_mxnet.py", line 7, in <module>
import mxnet as mx
File "/home/niranjan/mxnet/example/image-classification/../../python/mxnet/__init__.py", line 7, in <module>
from .base import MXNetError
File "/home/niranjan/mxnet/example/image-classification/../../python/mxnet/base.py", line 43, in <module>
_LIB = _load_lib()
File "/home/niranjan/mxnet/example/image-classification/../../python/mxnet/base.py", line 35, in _load_lib
lib = ctypes.cdll.LoadLibrary(lib_path[0])
File "/home/niranjan/anaconda/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "/home/niranjan/anaconda/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /lib64/libpangoft2-1.0.so.0: undefined symbol: FcWeightToOpenType
libpangoft2 is a gnome library. I'm guessing your opencv is not correctly installed/linked. Try compiling with USE_OPENCV=0 and see if the error persists.
i fixed above error by running this,
conda install -c asmeurer pango
but i got another error.
[niranjan@localhost mxnet]$ python example/image-classification/train_mnist.py
Traceback (most recent call last):
File "example/image-classification/train_mnist.py", line 1, in <module>
import find_mxnet
File "/home/niranjan/mxnet/example/image-classification/find_mxnet.py", line 7, in <module>
import mxnet as mx
File "/home/niranjan/mxnet/example/image-classification/../../python/mxnet/__init__.py", line 7, in <module>
from .base import MXNetError
File "/home/niranjan/mxnet/example/image-classification/../../python/mxnet/base.py", line 43, in <module>
_LIB = _load_lib()
File "/home/niranjan/mxnet/example/image-classification/../../python/mxnet/base.py", line 35, in _load_lib
lib = ctypes.cdll.LoadLibrary(lib_path[0])
File "/home/niranjan/anaconda/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "/home/niranjan/anaconda/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/niranjan/anaconda/bin/../lib/libgomp.so.1: version `GOMP_4.0' not found (required by /home/niranjan/mxnet/python/mxnet/../../lib/libmxnet.so)
The system needs GOMP
for openmp support. It seems you need to check it.
libgcc-5.3.1-2.fc23.x86_64
is already installed in my machine.can you tell me how to fix error.
Hi, sorry for the late reply.
I think the OpenMP doesn't install properly on your machine. Can you set USE_OPENMP = 0
and try again?
If it works, at least we know where the error came from.
can you tell me how to set USE_OPENMP = 0
, i have openMP version gcc-5.3.1-2.fc23.x86_64
I think we can say the problem is from OpenMP.
It is because you are using anaconda, which will link to GOMP_4.0
. However, in your system you are using gcc5. So you met the error.
Closing this now. Feel free to reopen it.
i set USE_OPENMP = 0
, i tried again it is working without any errors, but python package installation step i got error
[niranjan@localhost mxnet]$ cd python/
[niranjan@localhost python]$ sudo python setup.py install
[sudo] password for niranjan:
Traceback (most recent call last):
File "setup.py", line 14, in <module>
LIB_PATH = libinfo['find_lib_path']()
File "mxnet/libinfo.py", line 26, in find_lib_path
elif os.name == "posix" and os.environ['LD_LIBRARY_PATH']:
File "/usr/lib64/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'LD_LIBRARY_PATH'
The same error with https://github.com/dmlc/mxnet/issues/1283
Please wait for a little while.
I met the same problem as in the 3rd post, but not sure if my solution applies here. I'm on Ubuntu 16.04 with CUDA 8 and CUDNN v5.1.
❯ python train_mnist.py
Traceback (most recent call last):
File "train_mnist.py", line 1, in <module>
import find_mxnet
File "/mnt/raid/user1/Temp/image-classification/find_mxnet.py", line 2, in <module>
import mxnet as mx
File "/home/user1/mxnet/python/mxnet/__init__.py", line 7, in <module>
from .base import MXNetError
File "/home/user1/mxnet/python/mxnet/base.py", line 43, in <module>
_LIB = _load_lib()
File "/home/user1/mxnet/python/mxnet/base.py", line 35, in _load_lib
lib = ctypes.cdll.LoadLibrary(lib_path[0])
File "/home/user1/anaconda3/envs/mxnet/lib/python2.7/ctypes/__init__.py", line 440, in LoadLibrary
return self._dlltype(name)
File "/home/user1/anaconda3/envs/mxnet/lib/python2.7/ctypes/__init__.py", line 362, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/user1/anaconda3/envs/mxnet/bin/../lib/libgomp.so.1: version `GOMP_4.0' not found (required by /home/user1/mxnet/python/mxnet/../../lib/libmxnet.so)
Then I realised that it's looking at a different place for libgomp.so.1
from what
ldd ~/mxnet/lib/libmxnet.so
says:
❯ ldd lib/libmxnet.so | grep libgomp
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f3e30635000)
Turns out that those are all just symbolic links to the actual library file libgomp.so.1.0.0
so I replaced /home/user1/anaconda3/envs/mxnet/bin/../lib/libgomp.so.1.0.0
with /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0
and it proceeded to the next error:
❯ python train_mnist.py
Traceback (most recent call last):
File "train_mnist.py", line 1, in <module>
import find_mxnet
File "/mnt/user1/rluo/Temp/image-classification/find_mxnet.py", line 2, in <module>
import mxnet as mx
File "/home/user1/mxnet/python/mxnet/__init__.py", line 7, in <module>
from .base import MXNetError
File "/home/user1/mxnet/python/mxnet/base.py", line 43, in <module>
_LIB = _load_lib()
File "/home/user1/mxnet/python/mxnet/base.py", line 35, in _load_lib
lib = ctypes.cdll.LoadLibrary(lib_path[0])
File "/home/user1/anaconda3/envs/mxnet/lib/python2.7/ctypes/__init__.py", line 440, in LoadLibrary
return self._dlltype(name)
File "/home/user1/anaconda3/envs/mxnet/lib/python2.7/ctypes/__init__.py", line 362, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/user1/anaconda3/envs/mxnet/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/user1/mxnet/python/mxnet/../../lib/libmxnet.so)
from here I started to suspect that it's all anaconda
's fault...
ldd ~/mxnet/lib/libmxnet.so
returns
❯ ldd lib/libmxnet.so | grep libstdc++
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fadd0a21000)
/home/user1/anaconda3/envs/mxnet/bin/../lib/libstdc++.so.6
linkes to libstdc++.so.6.0.19
, while /usr/lib/x86_64-linux-gnu/libstdc++.so.6
links to libstdc++.so.6.0.21
So I copied libstdc++.so.6.0.21
over and changed the symbolic links, and it seems to work fine now.
I've the same problem and I've not understood how to apply madcarrot solution :/
Ubuntu 16.10 ,follow the comment ,fisrt changed listdc++,then changed libgomp,then changed pango .It works!
Thank you for great solution @madcarrot
in summary
ldd lib/libmxnet.so | grep libgomp
rm /your/path/to/anaconda2/lib/libgomp.so.1
ln -s /usr/lib/x86_64-linux-gnu/libgomp.so.1 /your/path/to//anaconda2/lib/libgomp.so.1
ldd ~/mxnet/lib/libmxnet.so
rm /your/path/to/anaconda2/bin/../lib/libstdc++.so.6
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /your/path/to/anaconda2/bin/../lib/libstdc++.so.6
but please be aware that it differs depends on ldd command result
Most helpful comment
I met the same problem as in the 3rd post, but not sure if my solution applies here. I'm on Ubuntu 16.04 with CUDA 8 and CUDNN v5.1.
Then I realised that it's looking at a different place for
libgomp.so.1
from whatldd ~/mxnet/lib/libmxnet.so
says:
Turns out that those are all just symbolic links to the actual library file
libgomp.so.1.0.0
so I replaced
/home/user1/anaconda3/envs/mxnet/bin/../lib/libgomp.so.1.0.0
with/usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0
and it proceeded to the next error:from here I started to suspect that it's all
anaconda
's fault...ldd ~/mxnet/lib/libmxnet.so
returns
/home/user1/anaconda3/envs/mxnet/bin/../lib/libstdc++.so.6
linkes tolibstdc++.so.6.0.19
, while/usr/lib/x86_64-linux-gnu/libstdc++.so.6
links tolibstdc++.so.6.0.21
So I copied
libstdc++.so.6.0.21
over and changed the symbolic links, and it seems to work fine now.