Open Jerry-jwz opened 2 years ago
I encountered the same question with you and i solved it using this command:
pip install torch-sparse==0.6.13 -f https://pytorch-geometric.com/whl/torch-1.10.0+cu113.html
I encountered the same question with you and i solved it using this command:
pip install torch-sparse==0.6.13 -f https://pytorch-geometric.com/whl/torch-1.10.0+cu113.html
It works! Thanks! But still don't know why torch-sparse-0.6.14 causes this trouble.
I encountered the same question with you and i solved it using this command:
pip install torch-sparse==0.6.13 -f https://pytorch-geometric.com/whl/torch-1.10.0+cu113.html
It works! Thanks! But still don't know why torch-sparse-0.6.14 causes this trouble.
check 'https://data.pyg.org/whl/index.html'. It only has torch-sparse-0.6.13
and torch-sparse-0.6.14
does not released yet. maybe that is the reason.
We only build new versions for the two latest PyTorch releases. That‘s why 0.6.13 is the last version for PyTorch 1.10.
wonderful! It help me a lot! Thanks for your goodness
In my environment, I had pytorch 2.0.1 with cuda 11.8 on windows. And none of the provided comment worked for me. Then I found the comment on PyG installation guide: https://pytorch-geometric.readthedocs.io/en/latest/install/installation.html
pip install torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.0.0+cu118.html
This worked just fine
I have tried to install pip install torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.0.0+cu118.html
But still I could not load torch_sparse
OSError Traceback (most recent call last) Cell In[2], line 1 ----> 1 import torch_sparse
File /media/ssrc/DataBase/cmu/lib/python3.8/site-packages/torch_sparse/init.py:19 17 spec = cuda_spec or cpu_spec 18 if spec is not None: ---> 19 torch.ops.load_library(spec.origin) 20 else: # pragma: no cover 21 raise ImportError(f"Could not find module '{library}_cpu' in " 22 f"{osp.dirname(file)}")
File /media/ssrc/DataBase/cmu/lib/python3.8/site-packages/torch/_ops.py:852, in _Ops.load_library(self, path) 847 path = _utils_internal.resolve_library_path(path) 848 with dl_open_guard(): 849 # Import the shared library into the process, thus running its 850 # static (global) initialization code in order to register custom 851 # operators with the JIT. --> 852 ctypes.CDLL(path) 853 self.loaded_libraries.add(path)
File /usr/lib/python3.8/ctypes/init.py:373, in CDLL.init(self, name, mode, handle, use_errno, use_last_error, winmode) 370 self._FuncPtr = _FuncPtr 372 if handle is None: --> 373 self._handle = _dlopen(self._name, mode) 374 else: 375 self._handle = handle
OSError: libtorch_cuda_cpp.so: cannot open shared object file: No such file or directory
What happens if you run via
pip uninstall torch-sparse
pip install --verbose --no-index torch_sparse -f https://data.pyg.org/whl/torch-2.0.0+cu118.html
I found the solution here.
Sooooooo useful to me! @downeykking I often encounter the same issue with packages such as torch_spline_conv, torch-cluster, torch-sparse, and torch-spline-conv, which are all related to Torch and CUDA versions. I solve torch-sparse error with command "pip install torch-sparse==0.6.12 -f https://pytorch-geometric.com/whl/torch-1.9.1+cu111.html" which can instead your cuda version and torch version inthe link "https://pytorch-geometric.com/whl/torch-1.9.1+cu111.html" , also we can solve torch-sparse error by "pip install torch-sparse==0.X.X -f https://pytorch-geometric.com/whl/torch-1.9.1+cu111.html"
install the latest version with the right torch and cuda version works for me:
pip install torch-sparse==0.6.18 -f https://pytorch-geometric.com/whl/torch-2.4.1+cu124.html
😵 Describe the installation problem
When I was installing torch-sparse through the command: pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.10.0+cu113.html, I was totally confused by the following error:
Before this, I had just fixed a warning saying 'Your compiler (g++ 4.8.5) may be ABI-incompatible with PyTorch! Please use a compiler that is ABI-compatible with GCC 5.0 and above', by 'conda install -c conda-forge gxx=9.4.0 gcc=9.4.0'. However, I am totally stuck with the above error. Hope anyone could help!
If you need any other info, please let me know.
Environment
conda
,pip
, source):pip