Skip to content
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

problem loading the *_cpu.so file #375

Closed
Mollyx06 opened this issue May 11, 2024 · 4 comments
Closed

problem loading the *_cpu.so file #375

Mollyx06 opened this issue May 11, 2024 · 4 comments

Comments

@Mollyx06
Copy link

Hello, thanks for sharing your detailed tutorial,
I don't have a GPU environment configured on my computer, so I'm trying to install the CPU version of torch and related dependency packages as follows
/opt/software/python/bin/python3.8 -m pip install --upgrade pip
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-2.0.1+cpu.html
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-2.0.1+cpu.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-2.0.1+cpu.html
pip install torch-geometric==2.0

But when importing they
OSError: /opt/software/python/lib/python3.8/site-packages/torch_sparse/_sample_cpu.so: undefined symbol: _ZN2at4_ops11randint_low4callEllN3c108ArrayRefINS2_6SymIntEEENS2_8optionalINS2_10ScalarTypeEEENS6_INS2_6LayoutEEENS6_INS2_6DeviceEEENS6_IbEE

my pip version
torch 2.3.0+cpu
torch-cluster 1.6.3+pt20cpu
torch_geometric 2.0.0
torch-scatter 2.1.2+pt20cpu
torch-sparse 0.6.18+pt20cpu
torchaudio 2.3.0+cpu
torchvision 0.18.0+cpu

I'm wondering if there are any conflicts between these versions and how I can get it to recognise this cpu library?

@rusty1s
Copy link
Owner

rusty1s commented May 12, 2024

This is likely because you are installing torch==2.3.0, but specify whl/torch-2.0.1+cpu.html in the links. You should install via

 pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-2.3.0+cpu.html

@Mollyx06
Copy link
Author

Thank you for your reply! I changed the latest version and now the problem is solved!
pip install torch_geometric
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.3.0+cpu.html

@lamthuy
Copy link

lamthuy commented May 27, 2024

I got a similar problem but the installation is for cuda when I created a fresh new conda env python 3.11 with the latest pytorch 2.3.0 with cuda 2.1.
Install PyG with

pip install torch_geometric
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.3.0+cu121.html

Then I got the following issue when I do

from torch_sparse import SparseTensor
376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by anaconda3/envs/ok/lib/python3.11/site-packages/libpyg.so)

@lamthuy
Copy link

lamthuy commented May 27, 2024

It turns out that the issue is due to pyglib, When install pyglib if I use:
pyg_lib==0.2 it will solve the problem, if I do not specify this old version, it will install 0.4 and the problem arises.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants