apex icon indicating copy to clipboard operation
apex copied to clipboard

Install issue, GLIBC_2.14 not found.

Open xyzacademic opened this issue 7 years ago • 3 comments

Hello,

Since I am using university' server in which glibc version is 2.12, I installed a local glibc 2.20 for my pytorch. When I am using pytorch, I have to write a alias and link the local glibc dynamic library to python.

alias python="$GLIBC_DIR/ld-2.20.so --library-path $GLIBC_DIR:/lib64:$LD_LIBRARY_PATH:/usr/lib64:$CUDNN_INCLUDE_DIR:$CUDNN_LIBRARY_PATH ~/Anaconda3/anaconda3/bin/python"

But when I install apex followed the instruction "pip install -v --no-cache-dir ." It gives me this error.

Running setup.py (path:/tmp/pip-req-build-isqv_zug/setup.py) egg_info for package from file:///home/y/yx277/external_package/apex Running command python setup.py egg_info Traceback (most recent call last): File "", line 1, in File "/tmp/pip-req-build-isqv_zug/setup.py", line 1, in import torch File "/home/y/yx277/Anaconda3/anaconda3/lib/python3.6/site-packages/torch/init.py", line 79, in from torch._C import * ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/y/yx277/Anaconda3/anaconda3/lib/python3.6/site-packages/torch/lib/libtorch_python.so) Cleaning up... Removing source in /tmp/pip-req-build-isqv_zug Removed file:///home/y/yx277/external_package/apex from build tracker '/tmp/pip-req-tracker-9pbtv2ap'

It seems alias python does not work here. So what can I do to fix this problem? I am very appreciate your help.

xyzacademic avatar May 01 '19 02:05 xyzacademic

It appears the Pytorch binaries are trying to load GLIBC_2.14. Maybe you should use local glibc 2.14 instead of 2.20? I must admit I haven't tried something like this myself.

mcarilli avatar May 01 '19 18:05 mcarilli

It appears the Pytorch binaries are trying to load GLIBC_2.14. Maybe you should use local glibc 2.14 instead of 2.20? I must admit I haven't tried something like this myself.

I have solved this problem. I open a shell of ubuntu16 docker image(you guys post on your home page), and install it correctly. But I did not try it with cuda and c++ extension. glibc version problem exists in many HPC system if their Linux system are old. And it seems glibc version lower than 2.20 is incompatible with python3.

xyzacademic avatar May 01 '19 19:05 xyzacademic

If you're in the Docker image, cuda and cpp extensions should work without trouble. We test those regularly. I recently updated the guidance for building Docker containers with Apex: https://github.com/NVIDIA/apex/tree/master/examples/docker

mcarilli avatar May 01 '19 20:05 mcarilli