From torch._C import* ImportError:libcurand.so.8.0

My previous installations of CUDA8.0, anaconda, python3.6, and pytorch 1.0 on ubuntu 16.04 worked fine.
I upgraded CUDA8.0 to CUDA10.0 and pytorch 1.0 to pytorch1.1 on ubuntu 16.04 server, and the following errors occurred:
file “/anaconda3/**/python3.6/site-packages/torch/init.py",line 79, in from torch._C import* ImportError:libcurand.so.8.0:cannont open shared object file:No such file or directory.

How to solve this problem? Thank you.

Did you build PyTorch from source?
If so, could you try to clean the build (python setup.py clean) and uninstall all old versions?

pip uninstall torch
pip uninstall torch
conda uninstall pytorch

(also *-nighly builds if previously installed).

However, if you didn’t build it from source, you don’t need to install CUDA on your system, as the PyTorch binaries will already ship with the CUDA and cudnn runtime libs.

First of all, thank you very much for your answer! I’m pretty sure I’ve installed torch under anaconda, but when I import torch in python, the current python environment doesn’t know all the search paths for dependent dynamic libraries under the torch library.

Could you create a new and clean conda environment and install pytorch there again?
E.g.:

conda create -n pytorch_env Python=3.7 Anaconda
...
conda activate pytorch_env
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch