1

I am trying to import mxnet on a shared cluster, but I encounter errors:

import mxnet as mx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ironfs/scratch/carlos/anaconda3/lib/python3.6/site-packages/mxnet/__init__.py", line 25, in <module>
    from .base import MXNetError
  File "/home/ironfs/scratch/carlos/anaconda3/lib/python3.6/site-packages/mxnet/base.py", line 96, in <module>
    _LIB = _load_lib()
  File "/home/ironfs/scratch/carlos/anaconda3/lib/python3.6/site-packages/mxnet/base.py", line 88, in _load_lib
    lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
  File "/home/ironfs/scratch/carlos/anaconda3/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /lib64/libc.so.6: version GLIBC_2.17' not found (required by /home/ironfs/scratch/carlos/anaconda3/lib/python3.6/site-packages/mxnet/libmxnet.so)

And I am not admin. Can anyone help me to fix that?

mij
  • 532
  • 6
  • 13
carlos
  • 11
  • 2
  • The prebuilt version probably relies on a newer glibc version than is present on your system. Instead of installing from pip / anaconda you should compile mxnet yourself. – leezu Jan 10 '18 at 13:51
  • Thank you so much for your help! So you suggest that I download mxnet source code and then use cmake to compile it? – carlos Jan 10 '18 at 13:56
  • Yes, you can follow the instructions here: http://mxnet.incubator.apache.org/install/index.html – leezu Jan 11 '18 at 01:41
  • Possible duplicate of [GLIBC\_2.7 not found](https://stackoverflow.com/questions/8819554/glibc-2-7-not-found) – Employed Russian Jan 12 '18 at 16:52

1 Answers1

0

the distributed version of mxnet 1.0.0 seems to have been compiled with glibc_2.7, you would need either to compile from source as mentioned by Ieezu (http://mxnet.incubator.apache.org/install/index.html) or upgrade your version of glibc.

objdump -T libmxnet.so | grep GLIBC_

... 0000000000000000 DO *UND* 0000000000000000 GLIBC_2.2.5 stdin 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 srand 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.6 __sched_cpucount 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.3 pthread_tryjoin_np 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 log10f 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 if_nametoindex 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.7 eventfd ...

Thomas
  • 676
  • 3
  • 18