ImportError: libcudart.so.9.0: cannot open shared object file: No such file or directory
Closed this issue · 2 comments
sheng-di commented
The whole error log is:
Traceback (most recent call last):
File "train.py", line 14, in <module>
from unet import UNet
File "/data3/yuechen/new/pytorch_unet/unet/__init__.py", line 1, in <module>
from .unet_model import UNet
File "/data3/yuechen/new/pytorch_unet/unet/unet_model.py", line 5, in <module>
from .unet_parts import *
File "/data3/yuechen/new/pytorch_unet/unet/unet_parts.py", line 7, in <module>
from inplace_abn import InPlaceABN, InPlaceABNSync
File "/data3/yuechen/software/anaconda3/envs/unet10/lib/python3.6/site-packages/inplace_abn/__init__.py", line 1, in <module>
from .abn import ABN, InPlaceABN, InPlaceABNSync
File "/data3/yuechen/software/anaconda3/envs/unet10/lib/python3.6/site-packages/inplace_abn/abn.py", line 8, in <module>
from .functions import inplace_abn, inplace_abn_sync
File "/data3/yuechen/software/anaconda3/envs/unet10/lib/python3.6/site-packages/inplace_abn/functions.py", line 8, in <module>
from . import _backend
ImportError: libcudart.so.9.0: cannot open shared object file: No such file or directory
CUDA Version 10.0.130
cuDNN Version 7.5.1
torch 1.2.0
torchvision 0.4.0a0+6b959ee
It seems the inplace_abn module still uses cuda 9.0.
I also set CUDA_HOME
and LD_LIBRARY_PATH
environment, but is doesn't work.
sheng-di commented
import torch
works ok, but this module wouldn't.
sheng-di commented
Before compiling and installing inplace-abn, manually set CUDA_HOME, otherwise it will use 9.0 by default. If it is already installed, the method is as follows:
# Uninstall this library
pip uninstall inplace-abn
# Clear pip cache
rm -r ~/.cache/pip
# Set CUDA_HOME
export CUDA_HOME=/usr/local/cuda-10.0
# re-install
pip install inplace-abn