rusty1s / pytorch_sparse

PyTorch Extension Library of Optimized Autograd Sparse Matrix Operations
MIT License
992 stars 146 forks source link

ImportError: Could not find module '_version_cpu', after build from source #354

Closed apri0426 closed 10 months ago

apri0426 commented 10 months ago

I encounter the issue with glibc version, so I try to build from source, but I get this import error.

I am on Centos7 with python3.11, pytorch2.0 and torch_sparse 0.6.18

Full log:

import torch_sparse

Traceback (most recent call last): File "\<stdin>", line 1, in \<module> File "/home/myname/pytorch_sparse/torch_sparse/init.py", line 20, in \<module> raise ImportError(f"Could not find module '{library}_cpu' in " ImportError: Could not find module '_version_cpu' in /home/myname/pytorch_sparse/torch_sparse

apri0426 commented 10 months ago

it turns out that file doesn't correctly recognize the path and returns none, so after manually specify the path, I was able to solve the issue