rsanchezgarc/deepEMhancer

ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

jianhaoc opened this issue · 2 comments

Hi, I install deepEMhancer according to guideline "Install from Anaconda cloud". However deepemhancer doesn't work (see below). I used nvidia-smi to check cuda (see below). Any way to fix it? Thank you!

Jianhao

$ nvidia-smi
Mon Jan 18 15:44:29 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.40 Driver Version: 430.40 CUDA Version: 10.1 |

Traceback (most recent call last):
File "/home/spuser/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/spuser/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/spuser/.local/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 "/opt/conda3/envs/deepEMhancer_env/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/opt/conda3/envs/deepEMhancer_env/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/conda3/envs/deepEMhancer_env/bin/deepemhancer", line 11, in
sys.exit(commanLineFun())
File "/opt/conda3/envs/deepEMhancer_env/lib/python3.6/site-packages/deepEMhancer/exeDeepEMhancer.py", line 80, in commanLineFun
main( ** parseArgs() )
File "/opt/conda3/envs/deepEMhancer_env/lib/python3.6/site-packages/deepEMhancer/exeDeepEMhancer.py", line 40, in main
import tensorflow as tf
File "/home/spuser/.local/lib/python3.6/site-packages/tensorflow/init.py", line 22, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/home/spuser/.local/lib/python3.6/site-packages/tensorflow/python/init.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "/home/spuser/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/spuser/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/spuser/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/spuser/.local/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 "/opt/conda3/envs/deepEMhancer_env/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/opt/conda3/envs/deepEMhancer_env/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.

Hello Jianhao,

The problem is that you have installed (previously I guess) another version of tensorflow in your home local dir (/home/spuser/.local/lib/python3.6/site-packages/tensorflow) and that version is being used instead of the version that comes with deepEMhancer (/opt/conda3/envs/deepEMhancer_env/lib/python3.6/site-packages/tensorflow).

The easiest solution would be to uninstall the version that is conflicting (pip uninstall tensorflow). However, this may interfere other programs using your home version.
Alternatively (according to https://stackoverflow.com/questions/35835274/how-to-reuse-global-site-packages-in-conda-env/36994958), you could set your PYTHONNOUSERSITE path variable before activating the environment

export PYTHONNOUSERSITE=True
conda activate deepEMhancer_env

Please, let me know if this works.

Best wishes,

Ruben

Thank you. That works!

Hello Jianhao,

The problem is that you have installed (previously I guess) another version of tensorflow in your home local dir (/home/spuser/.local/lib/python3.6/site-packages/tensorflow) and that version is being used instead of the version that comes with deepEMhancer (/opt/conda3/envs/deepEMhancer_env/lib/python3.6/site-packages/tensorflow).

The easiest solution would be to uninstall the version that is conflicting (pip uninstall tensorflow). However, this may interfere other programs using your home version.
Alternatively (according to https://stackoverflow.com/questions/35835274/how-to-reuse-global-site-packages-in-conda-env/36994958), you could set your PYTHONNOUSERSITE path variable before activating the environment

export PYTHONNOUSERSITE=True
conda activate deepEMhancer_env

Please, let me know if this works.

Best wishes,

Ruben