You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm having some issues correctly installing pytorch sparse with METIS support on a Mac with apple silicon. I'm trying to install for pytorch 2.1.0, without any CUDA support.
However, I was running into following issues when eventually trying to import
$ python
>>> from torch_sparse import SparseTensor, set_diag
...
...
OSError: dlopen(~/miniconda3/envs/gnnc/lib/python3.11/site-packages/torch_sparse/_metis_cpu.so, 0x0006): symbol not found in flat namespace '_METIS_PartGraphKway'
I continued by installing METIS as suggested in the docs. Here is the history of commands I used:
# METIS
gunzip metis-5.1.0.tar.gz
tar -xvf metis-5.1.0.tar
cd metis-5.1.0/
# ... make sure IDXTYPEWIDTH=64 in `include/metis.h`
make config shared=1 prefix=~/.local
make install
$ python
>>> from torch_sparse import SparseTensor, set_diag
...
...
OSError: dlopen(~/miniconda3/envs/gnn-pip/lib/python3.11/site-packages/torch_sparse/_version_cpu.so, 0x0006): Library not loaded: libmetis.dylib
Referenced from: <BA2B5C47-7378-35F1-B4B8-A6F3CFFCBCFC> ~/miniconda3/envs/gnn-pip/lib/python3.11/site-packages/torch_sparse/_version_cpu.so
Reason: tried: 'libmetis.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmetis.dylib' (no such file), 'libmetis.dylib' (no such file), '~/scratch-code/metis-5.1.0/libmetis.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/<path-to-metis-download>/metis-5.1.0/libmetis.dylib' (no such file), '<path-to-metis-download>/metis-5.1.0/libmetis.dylib' (no such file)
If needed, here is the GCC version I currently have:
$ gcc --version
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin23.0.0
Ideally, things would work without manually building METIS, but I understand this may be difficult to support for apple silicon. I tried also to build without shared=1, but similar errors happened. I'm happy to try different versions of python or pytorch, if that is potentially the issue, and also I can share any additional details if needed.
Thank you for help looking into this!
The text was updated successfully, but these errors were encountered:
Hi, I have the same issue. Did you manage to find a solution?
Thanks!
EDIT: In case someone, checks here, the only thing that worked for me (Apple M3 pro macbook pro) was to install the torch version 2.0.0. (it didn't work with 2.2 nor 2.1)
Make sure you pip3 uninstall "all torch related packages"
Hello,
I'm having some issues correctly installing pytorch sparse with METIS support on a Mac with apple silicon. I'm trying to install for pytorch 2.1.0, without any CUDA support.
Initially, I installed as follows:
However, I was running into following issues when eventually trying to import
I continued by installing METIS as suggested in the docs. Here is the history of commands I used:
However, a similar error still appears.
If needed, here is the GCC version I currently have:
Ideally, things would work without manually building METIS, but I understand this may be difficult to support for apple silicon. I tried also to build without
shared=1
, but similar errors happened. I'm happy to try different versions of python or pytorch, if that is potentially the issue, and also I can share any additional details if needed.Thank you for help looking into this!
The text was updated successfully, but these errors were encountered: