Import cv2 error, libcudart.so.6.5 no such file

When called in python, cv2 looks for the wrong libcudart.so. Below is the error after importing cv2

ImportError: libcudart.so.6.5: cannot open shared object file: No such file or directory.

I have both CUDA 6.5 and 7.5 installed on my system. But other applications do not seem to have problems finding 7.5.

Here are my settings: ubuntu 14.04, OpenCV 3.0.0, python 2.7, cuda 6.5 and cuda 7.5

LD_LIBRARY_PATH looks like

/usr/local/cuda/lib64:/usr/local/lib:/home/rspace/shogun-4.0.0/build-release/src/shogun:/usr/lib:/usr/lib/x86_64-linux-gnu

NOTE: / usr / local / cuda is actually a link to / usr / local / cuda-7.5.

+4
source share
2 answers

In short, this is what happened.

OpenCV. CUDA 6.5, make install ed. PYTHONPATH .../release/lib , - . LD_LIBRARY_PATH /usr/local/cuda/lib64, /usr/local/cuda , CUDA 6.5.

, import cv2, python , PYTHONPATH, opencv , CUDA LD_LIBRARY_PATH.

nvidia; CUDA 7.5. /usr/local/cuda , cuda-7.5.

, python cv2 , , 7.5, .

cv2, cuda 6.5 LD_LIBRARY_PATH, - Crovella. , opencv, CUDA 7.5, ...

+2

. , `opencv-python:

$pip install opencv-python

0

Source: https://habr.com/ru/post/1618347/


All Articles