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

Created on 17 Jan 2021  路  5Comments  路  Source: pytorch/vision

馃悰 Bug

To Reproduce

Steps to reproduce the behavior:

  1. from torchvision import _C

from torchvision import _C Traceback (most recent call last): File "", line 1, in ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory.

Environment

python collect_env.py

Collecting environment information...
PyTorch version: 1.1.0
Is debug build: False
CUDA used to build PyTorch: 10.0.130
ROCM used to build PyTorch: N/A
OS: Ubuntu 16.04.5 LTS (x86_64)
GCC version: (Ubuntu 8.4.0-1ubuntu1~16.04.1) 8.4.0
Clang version: Could not collect
CMake version: version 3.14.4
Python version: 3.6 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: 10.0.130
GPU models and configuration:
GPU 0: GeForce GTX 1080 Ti
GPU 1: GeForce GTX 1080 Ti
GPU 2: GeForce GTX 1080 Ti
GPU 3: GeForce GTX 1080 Ti
GPU 4: GeForce GTX 1080 Ti
GPU 5: GeForce GTX 1080 Ti
GPU 6: GeForce GTX 1080 Ti
GPU 7: GeForce GTX 1080 Ti
Nvidia driver version: 418.39
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.5.0
/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.5.1.10
HIP runtime version: N/A
MIOpen runtime version: N/A
Versions of relevant libraries:
[pip3] numpy==1.19.5
[pip3] torch==1.1.0
[pip3] torchvision==0.4.2
[conda] cudatoolkit               10.0.130             hf841e97_6    conda-forge
[conda] mkl                       2020.2                      256
[conda] numpy                     1.19.5           py36h2aa4a07_1    conda-forge
[conda] pytorch                   1.1.0           py3.6_cuda10.0.130_cudnn7.5.1_0    pytorch
[conda] torchvision               0.3.0           py36_cu10.0.130_1    pytorch

Additional context


I was using fasterRCNN Object detector in torchvision while doing keep = nms(boxes_for_nms, scores, iou_threshold) it is giving this error. Easy way to reproduce this error is to run

from torchvision import _C

Please help.

cc @fmassa @vfdev-5

question binaries

All 5 comments

You need CUDA Toolkit 10.1. Your system has CUDA Toolkit 10.0

Please file an issue to torchvision

You need CUDA Toolkit 10.1. Your system has CUDA Toolkit 10.0

@imaginary-person One another person's account on the same machine, this works. That person has CUDA Toolkit 10.0 installed and in his account, the import works.

@IISCAditayTripathi I think you installed environment can be buggy:

  • you have 2 versions of torchvision installed: 0.3.0 and 0.4.2

Currently, the latest version of torchvision is 0.8.2. If you would like the latest version, please, follow on how to install the latest stable version of torchvision with conda (https://pytorch.org/get-started/locally/):

conda install pytorch torchvision cudatoolkit=10.1 -c pytorch

(make sure to use a clean environment or uninstall previous installations).

@vfdev-5 It is working now. The problem was there were two installations of torchvision one was compiled for CUDA 10.1 . After removing that version, it seems to be working. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcleonard picture mcleonard  路  26Comments

fmassa picture fmassa  路  45Comments

dssa56 picture dssa56  路  60Comments

ShahriarSS picture ShahriarSS  路  30Comments

sumanthratna picture sumanthratna  路  28Comments