Tuesday, June 21, 2016

python - CuPy - import error - nvidia lib. not found

I get the following error when trying to import CuPy:



Traceback (most recent call last):

File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/cupy/__init__.py", line 20, in
six.reraise(ImportError, ImportError(msg), exc_info[2])
File "/usr/local/lib/python2.7/dist-packages/cupy/__init__.py", line 9, in
from cupy import core # NOQA
File "/usr/local/lib/python2.7/dist-packages/cupy/core/__init__.py", line 1, in
from cupy.core import core # NOQA
File "cupy/core/core.pyx", line 1, in init cupy.core.core (cupy/core/core.cpp:103472)
File "/usr/local/lib/python2.7/dist-packages/cupy/cuda/__init__.py", line 3, in
from cupy.cuda import compiler # NOQA

File "/usr/local/lib/python2.7/dist-packages/cupy/cuda/compiler.py", line 12, in
from cupy.cuda import function
File "cupy/cuda/function.pyx", line 1, in init cupy.cuda.function (cupy/cuda/function.cpp:6346)
ImportError: CuPy is not correctly installed. Please check your environment, uninstall CuPy and reinstall it with `pip install cupy --no-cache-dir -vvvv`.

original error: libnvidia-fatbinaryloader.so.375.82: cannot open shared object file: No such file or directory


I have tried to reinstall CuPy with the suggestion. Also, I tried to copy the libnvidia-fatbinaryloader.so.375.82 file from /usr/lib/nvidia-375 to /usr/local/cuda-8.0/lib64/ but does not work.




In fact, when I copy that file to /usr/local/cuda-8.0/lib64/ I get this error (when trying to create an array):



>>> import cupy as cp

>>> x_gpu = cp.array([1, 2, 3])

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/cupy/creation/from_data.py", line 26, in array
return core.array(obj, dtype, copy, ndmin)

File "cupy/core/core.pyx", line 1822, in cupy.core.core.array (cupy/core/core.cpp:59154)
File "cupy/core/core.pyx", line 1848, in cupy.core.core.array (cupy/core/core.cpp:58918)
File "cupy/core/core.pyx", line 92, in cupy.core.core.ndarray.__init__ (cupy/core/core.cpp:6509)
File "cupy/cuda/memory.pyx", line 283, in cupy.cuda.memory.alloc (cupy/cuda/memory.cpp:5911)
File "cupy/cuda/memory.pyx", line 263, in cupy.cuda.memory._malloc (cupy/cuda/memory.cpp:5853)
File "cupy/cuda/memory.pyx", line 264, in cupy.cuda.memory._malloc (cupy/cuda/memory.cpp:5739)
File "cupy/cuda/memory.pyx", line 34, in cupy.cuda.memory.Memory.__init__ (cupy/cuda/memory.cpp:1789)
File "cupy/cuda/device.pyx", line 67, in cupy.cuda.device.Device.__init__ (cupy/cuda/device.cpp:1789)
File "cupy/cuda/runtime.pyx", line 158, in cupy.cuda.runtime.getDevice (cupy/cuda/runtime.cpp:2563)
File "cupy/cuda/runtime.pyx", line 130, in cupy.cuda.runtime.check_status (cupy/cuda/runtime.cpp:2242)

cupy.cuda.runtime.CUDARuntimeError: cudaErrorUnknown: unknown error


My CUDA version: 8.0



Ubuntu 16.04



Python: 2.7



Could somebody help? I want to avoid reinstalling CUDA if it's possible. If you need further information to solve it, do not hesitate to ask. Thank you!

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...