conda-forge / pytorch_geometric-feedstock

A conda-smithy repository for pytorch_geometric.
BSD 3-Clause "New" or "Revised" License
5 stars 17 forks source link

Import of PyTorch Geometric fails #16

Closed raimis closed 1 year ago

raimis commented 2 years ago

Issue:

I have installed the latest package (2.0.3) and it fails to import:

$ mamba create -n tmp_pyg_cf_2 -c conda-forge pytorch_geometric==2.0.3 pytorch-gpu==1.10.0
$ conda activate tmp_pyg_cf_2
$ python -c "import torch_geometric"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/shared2/raimis/opt/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_geometric/__init__.py", line 4, in <module>
    import torch_geometric.data
  File "/shared2/raimis/opt/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_geometric/data/__init__.py", line 1, in <module>
    from .data import Data
  File "/shared2/raimis/opt/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_geometric/data/data.py", line 3, in <module>
    from torch_geometric.typing import OptTensor, NodeType, EdgeType
  File "/shared2/raimis/opt/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_geometric/typing.py", line 4, in <module>
    from torch_sparse import SparseTensor
  File "/shared2/raimis/opt/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_sparse/__init__.py", line 14, in <module>
    torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
  File "/shared2/raimis/opt/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch/_ops.py", line 110, in load_library
    ctypes.CDLL(path)
  File "/shared2/raimis/opt/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /shared2/raimis/opt/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_sparse/_convert_cuda.so: undefined symbol: _ZNK2at6Tensor6deviceEv

The similar issues was present in the previous conda-forge package (https://github.com/pyg-team/pytorch_geometric/issues/3660).

Ping: @mikemhenry @jchodera


Environment (conda list):

``` $ conda list # packages in environment at /shared2/raimis/opt/miniconda/envs/tmp_pyg_cf_2: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge attrs 21.4.0 pyhd8ed1ab_0 conda-forge bottleneck 1.3.2 py39hce5d2b2_5 conda-forge brotli 1.0.9 h7f98852_6 conda-forge brotli-bin 1.0.9 h7f98852_6 conda-forge brotlipy 0.7.0 py39h3811e60_1003 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge ca-certificates 2021.10.8 ha878542_0 conda-forge certifi 2021.10.8 py39hf3d152e_1 conda-forge cffi 1.15.0 py39h4bc2ebd_0 conda-forge charset-normalizer 2.0.10 pyhd8ed1ab_0 conda-forge colorama 0.4.4 pyh9f0ad1d_0 conda-forge coverage 6.2 py39h3811e60_0 conda-forge cryptography 36.0.1 py39h95dcef6_0 conda-forge cudatoolkit 11.1.1 h6406543_9 conda-forge cudnn 8.2.1.32 h86fa8c9_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge fonttools 4.28.5 py39h3811e60_0 conda-forge freetype 2.10.4 h0708190_1 conda-forge future 0.18.2 py39hf3d152e_4 conda-forge googledrivedownloader 0.4 pyhd3deb0d_1 conda-forge html5lib 1.1 pyh9f0ad1d_0 conda-forge idna 3.3 pyhd8ed1ab_0 conda-forge importlib-metadata 4.10.1 py39hf3d152e_0 conda-forge iniconfig 1.1.1 pyh9f0ad1d_0 conda-forge intel-openmp 2021.4.0 h06a4308_3561 isodate 0.6.1 pyhd8ed1ab_0 conda-forge jbig 2.1 h7f98852_2003 conda-forge jinja2 3.0.3 pyhd8ed1ab_0 conda-forge joblib 1.1.0 pyhd8ed1ab_0 conda-forge jpeg 9d h36c2ea0_0 conda-forge kiwisolver 1.3.2 py39h1a9c180_1 conda-forge lcms2 2.12 hddcbb42_0 conda-forge ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge lerc 3.0 h9c3ff4c_0 conda-forge libblas 3.9.0 12_linux64_mkl conda-forge libbrotlicommon 1.0.9 h7f98852_6 conda-forge libbrotlidec 1.0.9 h7f98852_6 conda-forge libbrotlienc 1.0.9 h7f98852_6 conda-forge libcblas 3.9.0 12_linux64_mkl conda-forge libdeflate 1.8 h7f98852_0 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-ng 11.2.0 h1d223b6_11 conda-forge libgfortran-ng 11.2.0 h69a702a_11 conda-forge libgfortran5 11.2.0 h5c6108e_11 conda-forge libgomp 11.2.0 h1d223b6_11 conda-forge liblapack 3.9.0 12_linux64_mkl conda-forge libnsl 2.0.0 h7f98852_0 conda-forge libpng 1.6.37 h21135ba_2 conda-forge libprotobuf 3.18.1 h780b84a_0 conda-forge libstdcxx-ng 11.2.0 he4da1e4_11 conda-forge libtiff 4.3.0 h6f004c6_2 conda-forge libuuid 2.32.1 h7f98852_1000 conda-forge libwebp-base 1.2.2 h7f98852_0 conda-forge libzlib 1.2.11 h36c2ea0_1013 conda-forge lz4-c 1.9.3 h9c3ff4c_1 conda-forge magma 2.5.4 ha9b7cf9_2 conda-forge markupsafe 2.0.1 py39h3811e60_1 conda-forge matplotlib-base 3.5.1 py39h2fa2bec_0 conda-forge mkl 2021.4.0 h06a4308_640 munkres 1.1.4 pyh9f0ad1d_0 conda-forge nccl 2.11.4.1 h7537e88_1 conda-forge ncurses 6.3 h9c3ff4c_0 conda-forge networkx 2.6.3 pyhd8ed1ab_1 conda-forge ninja 1.10.2 h4bd325d_1 conda-forge numexpr 2.7.3 py39hde0f152_1 conda-forge numpy 1.22.0 py39h91f2184_1 conda-forge olefile 0.46 pyh9f0ad1d_1 conda-forge openjpeg 2.4.0 hb52868f_1 conda-forge openssl 1.1.1l h7f98852_0 conda-forge packaging 21.3 pyhd8ed1ab_0 conda-forge pandas 1.3.5 py39h8c16a72_0 pillow 8.4.0 py39ha612740_0 conda-forge pip 21.3.1 pyhd8ed1ab_0 conda-forge pluggy 1.0.0 py39hf3d152e_2 conda-forge py 1.11.0 pyh6c4a22f_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyopenssl 21.0.0 pyhd8ed1ab_0 conda-forge pyparsing 3.0.6 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 py39hf3d152e_4 conda-forge pytest 6.2.5 py39hf3d152e_2 conda-forge pytest-cov 3.0.0 pyhd8ed1ab_0 conda-forge python 3.9.9 h62f1059_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-louvain 0.15 pyhd3deb0d_0 conda-forge python_abi 3.9 2_cp39 conda-forge pytorch 1.10.0 cuda111py39hb4a4491_0 conda-forge pytorch-gpu 1.10.0 cuda111py39h788eb59_0 conda-forge pytorch_geometric 2.0.3 pyh6c4a22f_0 conda-forge pytorch_scatter 2.0.7 py39ha2a3c8e_0 conda-forge pytorch_sparse 0.6.10 py39ha2a3c8e_1 conda-forge pytz 2021.3 pyhd8ed1ab_0 conda-forge rdflib 6.1.1 pyhd8ed1ab_0 conda-forge readline 8.1 h46c0cb4_0 conda-forge requests 2.27.1 pyhd8ed1ab_0 conda-forge scikit-learn 1.0.2 py39h4dfa638_0 conda-forge scipy 1.7.3 py39hee8e79c_0 conda-forge setuptools 60.5.0 py39hf3d152e_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sleef 3.5.1 h9b69904_2 conda-forge sqlite 3.37.0 h9cd32fc_0 conda-forge threadpoolctl 3.0.0 pyh8a188c0_0 conda-forge tk 8.6.11 h27826a3_1 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.0 pyhd8ed1ab_1 conda-forge tqdm 4.62.3 pyhd8ed1ab_0 conda-forge typing_extensions 4.0.1 pyha770c72_0 conda-forge tzdata 2021e he74cb21_0 conda-forge urllib3 1.26.8 pyhd8ed1ab_1 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge xz 5.2.5 h516909a_1 conda-forge zipp 3.7.0 pyhd8ed1ab_0 conda-forge zlib 1.2.11 h36c2ea0_1013 conda-forge zstd 1.5.1 ha95c52a_0 conda-forge ```


Details about conda and system ( conda info ):

``` $ conda info active environment : tmp_pyg_cf_2 active env location : /shared2/raimis/opt/miniconda/envs/tmp_pyg_cf_2 shell level : 2 user config file : /home/raimis/.condarc populated config files : /home/raimis/.condarc conda version : 4.11.0 conda-build version : 3.21.7 python version : 3.9.9.final.0 virtual packages : __cuda=11.5=0 __linux=3.10.0=0 __glibc=2.17=0 __unix=0=0 __archspec=1=x86_64 base environment : /shared2/raimis/opt/miniconda (writable) conda av data dir : /shared2/raimis/opt/miniconda/etc/conda conda av metadata url : None channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /shared2/raimis/opt/miniconda/pkgs /home/raimis/.conda/pkgs envs directories : /shared2/raimis/opt/miniconda/envs /home/raimis/.conda/envs platform : linux-64 user-agent : conda/4.11.0 requests/2.27.1 CPython/3.9.9 Linux/3.10.0-1160.21.1.el7.x86_64 centos/7.9.2009 glibc/2.17 UID:GID : 1006:1006 netrc file : None offline mode : False ```
jchodera commented 2 years ago

I can confirm I get the same exception as @raimis:

$ mamba create -n tmp_pyg_cf_2 -c conda-forge pytorch_geometric==2.0.3 pytorch-gpu==1.10.0
$ conda activate tmp_pyg_cf_2
$ python -c "import torch_geometric"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/lila/home/chodera/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_geometric/__init__.py", line 4, in <module>
    import torch_geometric.data
  File "/lila/home/chodera/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_geometric/data/__init__.py", line 1, in <module>
    from .data import Data
  File "/lila/home/chodera/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_geometric/data/data.py", line 3, in <module>
    from torch_geometric.typing import OptTensor, NodeType, EdgeType
  File "/lila/home/chodera/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_geometric/typing.py", line 4, in <module>
    from torch_sparse import SparseTensor
  File "/lila/home/chodera/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_sparse/__init__.py", line 14, in <module>
    torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
  File "/lila/home/chodera/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch/_ops.py", line 110, in load_library
    ctypes.CDLL(path)
  File "/lila/home/chodera/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /lila/home/chodera/miniconda/envs/tmp_pyg_cf_2/lib/python3.9/site-packages/torch_sparse/_convert_cuda.so: undefined symbol: _ZNK2at6Tensor6deviceEv
Environment (`conda list`): ``` # packages in environment at /lila/home/chodera/miniconda/envs/tmp_pyg_cf_2: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge attrs 21.4.0 pyhd8ed1ab_0 conda-forge blas 1.0 mkl bottleneck 1.3.2 py39hce5d2b2_5 conda-forge brotli 1.0.9 h7f98852_6 conda-forge brotli-bin 1.0.9 h7f98852_6 conda-forge brotlipy 0.7.0 py39h3811e60_1003 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge ca-certificates 2021.10.26 h06a4308_2 certifi 2021.10.8 py39hf3d152e_1 conda-forge cffi 1.15.0 py39h4bc2ebd_0 conda-forge charset-normalizer 2.0.10 pyhd8ed1ab_0 conda-forge colorama 0.4.4 pyh9f0ad1d_0 conda-forge coverage 6.2 py39h3811e60_0 conda-forge cryptography 36.0.0 py39h9ce1e76_0 cudatoolkit 11.3.1 h2bc3f7f_2 cudnn 8.2.1.32 h86fa8c9_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge fonttools 4.28.5 py39h3811e60_0 conda-forge freetype 2.11.0 h70c0345_0 future 0.18.2 py39hf3d152e_4 conda-forge googledrivedownloader 0.4 pyhd3deb0d_1 conda-forge html5lib 1.1 pyh9f0ad1d_0 conda-forge idna 3.3 pyhd8ed1ab_0 conda-forge importlib-metadata 4.10.1 py39hf3d152e_0 conda-forge iniconfig 1.1.1 pyh9f0ad1d_0 conda-forge intel-openmp 2021.4.0 h06a4308_3561 isodate 0.6.1 pyhd8ed1ab_0 conda-forge jbig 2.1 h7f98852_2003 conda-forge jinja2 3.0.3 pyhd8ed1ab_0 conda-forge joblib 1.1.0 pyhd8ed1ab_0 conda-forge jpeg 9d h516909a_0 conda-forge kiwisolver 1.3.2 py39h1a9c180_1 conda-forge lcms2 2.12 hddcbb42_0 conda-forge ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge lerc 3.0 h9c3ff4c_0 conda-forge libblas 3.9.0 12_linux64_mkl conda-forge libbrotlicommon 1.0.9 h7f98852_6 conda-forge libbrotlidec 1.0.9 h7f98852_6 conda-forge libbrotlienc 1.0.9 h7f98852_6 conda-forge libcblas 3.9.0 12_linux64_mkl conda-forge libdeflate 1.8 h7f98852_0 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-ng 11.2.0 h1d223b6_11 conda-forge libgfortran-ng 11.2.0 h69a702a_11 conda-forge libgfortran5 11.2.0 h5c6108e_11 conda-forge libgomp 11.2.0 h1d223b6_11 conda-forge liblapack 3.9.0 12_linux64_mkl conda-forge libnsl 2.0.0 h7f98852_0 conda-forge libpng 1.6.37 hed695b0_2 conda-forge libprotobuf 3.18.1 h780b84a_0 conda-forge libstdcxx-ng 11.2.0 he4da1e4_11 conda-forge libtiff 4.3.0 h6f004c6_2 conda-forge libuuid 2.32.1 h14c3975_1000 conda-forge libwebp-base 1.2.2 h7f98852_0 conda-forge libzlib 1.2.11 h36c2ea0_1013 conda-forge lz4-c 1.9.3 h9c3ff4c_1 conda-forge magma 2.5.4 h6103c52_2 conda-forge markupsafe 2.0.1 py39h3811e60_1 conda-forge matplotlib-base 3.5.1 py39h2fa2bec_0 conda-forge mkl 2021.4.0 h06a4308_640 mkl-service 2.4.0 py39h3811e60_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge nccl 2.11.4.1 h5c60f85_1 conda-forge ncurses 6.3 h9c3ff4c_0 conda-forge networkx 2.6.3 pyhd8ed1ab_1 conda-forge ninja 1.10.2 h4bd325d_1 conda-forge numexpr 2.8.1 py39h6abb31d_0 numpy 1.22.0 py39h91f2184_1 conda-forge olefile 0.46 pyh9f0ad1d_1 conda-forge openjpeg 2.4.0 hb52868f_1 conda-forge openssl 3.0.0 h7f98852_2 conda-forge packaging 21.3 pyhd8ed1ab_0 conda-forge pandas 1.3.5 py39h8c16a72_0 pillow 8.4.0 py39ha612740_0 conda-forge pip 21.3.1 pyhd8ed1ab_0 conda-forge pluggy 1.0.0 py39hf3d152e_2 conda-forge py 1.11.0 pyh6c4a22f_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyopenssl 21.0.0 pyhd8ed1ab_0 conda-forge pyparsing 3.0.6 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 py39hf3d152e_4 conda-forge pytest 6.2.5 py39hf3d152e_2 conda-forge pytest-cov 3.0.0 pyhd8ed1ab_0 conda-forge python 3.9.9 h543edf9_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-louvain 0.15 pyhd3deb0d_0 conda-forge python_abi 3.9 2_cp39 conda-forge pytorch 1.10.0 cuda112py39h4e14dd4_0 conda-forge pytorch-gpu 1.10.0 cuda112py39h0bbbad9_0 conda-forge pytorch_geometric 2.0.3 pyh6c4a22f_0 conda-forge pytorch_scatter 2.0.7 py39hee7401c_0 conda-forge pytorch_sparse 0.6.10 py39hee7401c_1 conda-forge pytz 2021.3 pyhd8ed1ab_0 conda-forge rdflib 6.1.1 pyhd8ed1ab_0 conda-forge readline 8.1.2 h7f8727e_1 requests 2.27.1 pyhd8ed1ab_0 conda-forge scikit-learn 1.0.2 py39h4dfa638_0 conda-forge scipy 1.7.3 py39hee8e79c_0 conda-forge setuptools 60.5.0 py39hf3d152e_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sleef 3.5.1 h28343ad_2 conda-forge sqlite 3.37.0 h9cd32fc_0 conda-forge threadpoolctl 3.0.0 pyh8a188c0_0 conda-forge tk 8.6.11 h27826a3_1 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.0 pyhd8ed1ab_1 conda-forge tqdm 4.62.3 pyhd8ed1ab_0 conda-forge typing_extensions 4.0.1 pyha770c72_0 conda-forge tzdata 2021e he74cb21_0 conda-forge urllib3 1.26.8 pyhd8ed1ab_1 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge xz 5.2.5 h516909a_1 conda-forge zipp 3.7.0 pyhd8ed1ab_0 conda-forge zlib 1.2.11 h36c2ea0_1013 conda-forge zstd 1.5.1 ha95c52a_0 conda-forge ```
Details about `conda` and system (`conda info`): ``` active environment : tmp_pyg_cf_2 active env location : /lila/home/chodera/miniconda/envs/tmp_pyg_cf_2 shell level : 2 user config file : /home/chodera/.condarc populated config files : /lila/home/chodera/miniconda/.condarc /home/chodera/.condarc conda version : 4.10.1 conda-build version : not installed python version : 3.9.4.final.0 virtual packages : __cuda=11.3=0 __linux=3.10.0=0 __glibc=2.17=0 __unix=0=0 __archspec=1=x86_64 base environment : /lila/home/chodera/miniconda (writable) conda av data dir : /lila/home/chodera/miniconda/etc/conda conda av metadata url : https://repo.anaconda.com/pkgs/main channel URLs : https://conda.anaconda.org/psi4/linux-64 https://conda.anaconda.org/psi4/noarch https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://conda.anaconda.org/omnia-dev/linux-64 https://conda.anaconda.org/omnia-dev/noarch https://conda.anaconda.org/omnia/linux-64 https://conda.anaconda.org/omnia/noarch https://conda.anaconda.org/openeye/linux-64 https://conda.anaconda.org/openeye/noarch https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /lila/home/chodera/miniconda/pkgs /home/chodera/.conda/pkgs envs directories : /lila/home/chodera/miniconda/envs /home/chodera/.conda/envs platform : linux-64 user-agent : conda/4.10.1 requests/2.25.1 CPython/3.9.4 Linux/3.10.0-957.12.2.el7.x86_64 centos/7.6.1810 glibc/2.17 UID:GID : 1184:3008 netrc file : None offline mode : False ```
hadim commented 1 year ago

I think this issue can be closed as the CF packages related to pyg are fully working as long the pytorch package is coming from CF as well.

hadim commented 1 year ago

Please reopen if you are still seeing the issue here.