pytorch_geometric: AttributeError: 'NoneType' object has no attribute 'origin'
📚 Installation
Traceback (most recent call last): File “/home/shelly/bourne/reimp_paper/MTAG-main/test/t1.py”, line 24, in <module> import torch_sparse File “/home/shelly/anaconda3/envs/pyt/lib/python3.6/site-packages/torch_sparse/init.py”, line 15, in <module> f’{library}_{suffix}', [osp.dirname(file)]).origin) AttributeError: ‘NoneType’ object has no attribute ‘origin’
Environment
-
OS: Ubuntu20.04
-
Python version:3.6.3
-
PyTorch version:1.8.0
-
CUDA/cuDNN version:11.1
-
GCC version:
-
How did you try to install PyTorch Geometric and its extensions (wheel, source): follow https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html 。。 Installation via Binaries
-
Any other relevant information:
Checklist
- [1 ] I followed the installation guide.
- [1 ] I cannot find my error message in the FAQ.
- [1] I set up CUDA correctly and can compile CUDA code via
nvcc
. - [0 ] I do have multiple CUDA versions on my machine.
Additional context
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 29 (8 by maintainers)
I solved the problem by replacing
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.7.1+cu110.html
withpip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.7.0+cu110.html
(My PyTorch version is 1.7.1)I had the same problem and error statement. The problem in my situation was because I had multiple versions of the CUDA toolkit installed. I fixed this by setting the directory in PATH to point directly to the cuda-11.1 folder:
And the same for CPATH and LD_LIBRARY_PATH:
Then, uninstall torch-sparse, and install with the
--no-cache-dir
flag, so it doesn’t use the cached wheel.You are correct and I am wrong, and for that I apologize. Easybuild (the software we use to manage the installs of scientific software) needed some help to push those variables through.
I am sorry for the noise. With
It works.
By the way, whoever expects TORCH_CUDA_ARCH_LIST to be a semicolon-separated list deserves a full plate of rotten fish.