-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSError: libcusparse.so.11: cannot open shared object file: No such file or directory #2040
Comments
You can try to add the minconda CUDA libs installed by PyTorch to
This folder should contain |
I have write it "export PATH=/usr/local/cuda-11.0/bin:$PATH However, I can use geometric in terminal, but can't pycharm |
I'm not a PyCharm user, so I can't give you any advice on this one, but I guess PyCharm has some kind of editor to set environment variables. |
Same problem, work well in terminal but not in pycharm... |
I have the same problem, however it is not working in terminal either |
Please make sure that the folder containing |
@rusty1s I did this but still was not working. |
I had the exact same issue with torch 1.9.0 and cu 11.1 as mentioned in OP. I did what @DeVriesMatt did and it seems to work perfectly fine now. |
I got the same problem with python3.8 torch_geometric1.9.0. |
I've checked my virtual environment path |
My other virtual envs containing torch-geometric 1.8.0 does have |
I did downgrading too, solved my problem. |
I had similar issue with OP. I checked environment's lib, there actually is So I tried to create new conda-environment with python 3.9.6 and install pytorch 1.9.0 with cuda11.1 plus compatible pyg by using conda. |
@rusty1s I find that my miniconda/lib folder do not contain the "libcusparse.so.11". How can I install it? |
If you are inside a custom miniconda environment, you may also find them inside |
Still works today, thanks for the info! |
Thanks! |
I met a similar case. I can run it in the terminal but not in the jupyter notebook |
can you add the path inside the jupyter notebook as well? |
I added the path in Jupyter Notebook, but did not work. Any suggestions? Thanks |
I solved this by: Steps:
|
For those who cannot find |
Hi, I meet this problem again. I tried to use conda install to install pyg. Does anyone successfully do that? Thanks. |
What is your PyTorch version and how did you install it? Do you have a local CUDA version installed? |
@smiles724 @zilangch @domilay |
Using |
if the above method does not work, you can try to add the following code in your main.py |
I met the same issue, it can run in the terminal but failed when run in jupyter. But this solution doesn't work for me. P |
Hi, thanks for your solution. But i wonder wether i have to manually edit the run/debug configurations everytime i run a new python script. I try to add the environment variables in setting-Build,Excution,Deployment-Console in pycharm, but it did not work. Did you find any solution for this? |
Check if Even if you had lubcusparse.so.11 in your lib directory prior to this step, it maybe outdated/broken. Doing the above install worked for me. |
I've also come across this issue and have solved it. Here are my findings: Solution:Make sure the versions of your CUDA, CUDA toolkit, Pytorch, torch_sparse&scatter&... satisfies: torch_sparse&scatter&... == Pytorch == CUDA toolkit <= CUDA for those who are confused with these: 1 Check your CUDA versionuse 2. Check your CUDA toolkit versionFirst you need to know whether you are using cudatoolkit from a virtual environment or from system environment. Note this is not equal to whether you are running your code in a virtual environment or system environment. Actually you can run your code in a virtual environment and using cudatoolkit from system environment. A simple way to tell is: if you are using conda and followed the instructions in https://pytorch.org/get-started/previous-versions/ to install Pytorch & cudatoolkit, e.g. 2.1 if you are using cudatoolkit from a virtual environment(conda)use 2.2 if you are using cudatoolkit from system environmentYou need to download cudatoolkit from https://developer.nvidia.com/cuda-toolkit-archive and install it manually. You can install multiple versions of cudatoolkit in your system environment. But you need to specify the version (corresponding to your code) before you run your codes. This Article might help: 3. Pytorch versionYou should follow the instructions in https://pytorch.org/get-started/previous-versions/ to install Pytorch. If you are not using conda, make sure your Pytorch version == cudatoolkit version. 4. PyG Dependencies versionYou should follow the instructions in https://pytorch-geometric.readthedocs.io/en/latest/install/installation.html to install PyG and its dependencies (torch_scatter, torch_sparse,...), the versions of which depend on the version of Pytorch (https://data.pyg.org/whl/). Hope this will help. |
📚 Installation
Error occurs when I run
from torch_geometric.data import Data
Environment
Checklist
nvcc
. <--- not sure how to do this, but I have been running pytorch on GPU fine all this whilepython -c "import torch; print(torch.__version__)"
returns1.7.1+cu110
andpython -c "import torch; print(torch.version.cuda)"
returns11.0
Additional context
Installed via:
The text was updated successfully, but these errors were encountered: