pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
21.43k stars 3.68k forks source link

OSError: /libstdc++.so.6: version `GLIBCXX_3.4.21' not found #1159

Open navid-mahmoudian opened 4 years ago

navid-mahmoudian commented 4 years ago

🐛 Bug

Hello, I followed exactly the instruction given in this link, but I keep getting the following error OSError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_sparse/_convert.so)

I tried to use the suggestion given in this link by doing pip install libgcc ,but I get the following error:

ERROR: Could not find a version that satisfies the requirement libgcc (from versions: none) ERROR: No matching distribution found for libgcc

Environment

Additional context

Here is the complete trace of the error I get: File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_sparse/init.py", line 15, in library, [osp.dirname(file)]).origin) File "/soft/igrida/pytorch/1.4-py3.6/lib/python3.6/site-packages/torch/_ops.py", line 106, in load_library ctypes.CDLL(path) File "/soft/igrida/spack/opt/spack/linux-debian8-x86_64/gcc-9.1.0/python-3.6.5-xu2dmz5rdvjfmiizbt65hyy2hsqsn3ri/lib/python3.6/ctypes/init.py", line 348, in init self._handle = _dlopen(self._name, mode) OSError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_sparse/_convert.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/nfs/nas4/sirocco-intercom/sirocco-intercom/Codes/train.py", line 3, in import model_sphere_autoencoder File "/nfs/nas4/sirocco-intercom/sirocco-intercom/Codes/model_sphere_autoencoder.py", line 3, in import torch_geometric.nn as nn_torch_geometric File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_geometric/init.py", line 2, in import torch_geometric.nn File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_geometric/nn/init.py", line 2, in from .data_parallel import DataParallel File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_geometric/nn/data_parallel.py", line 5, in from torch_geometric.data import Batch File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_geometric/data/init.py", line 1, in from .data import Data File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_geometric/data/data.py", line 7, in from torch_sparse import coalesce File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_sparse/init.py", line 23, in raise OSError(e) OSError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_sparse/_convert.so)

navid-mahmoudian commented 4 years ago

Hello, I upgraded my gcc to gcc 9.1.0, and I am getting another error:

ImportError: dlopen: cannot load any more object with static TLS


Contents of /nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/sklearn/check_build: _check_build.cpython-36m-x86_64-linux-gnu.sosetup.py init.py pycache__


It seems that scikit-learn has not been built correctly.

If you have installed scikit-learn from source, please do not forget to build the package before using it: run python setup.py install or make in the source directory.

If you have used an installer, please check that it is suited for your Python version, your operating system and your platform.

I have installed scikit-learn using pip and I verified its correct installation according to this link. When I do: python -c "import sklearn; sklearn.show_versions()"

I get:

System: python: 3.6.5 (default, Dec 19 2019, 19:22:19) [GCC 9.1.0] executable: /nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/bin/python machine: Linux-3.16.0-6-amd64-x86_64-with-debian-8.10

Python dependencies: pip: 20.0.2 setuptools: 46.1.3 sklearn: 0.22.2.post1 numpy: 1.17.0 scipy: 1.4.1 Cython: None pandas: 1.0.3 matplotlib: 3.2.1 joblib: 0.14.1

Built with OpenMP: True

The full traceback of error is as follows:

Traceback (most recent call last): File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/sklearn/__check_build/init.py", line 44, in from ._check_build import check_build # noqa ImportError: dlopen: cannot load any more object with static TLS

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/nfs/nas4/sirocco-intercom/sirocco-intercom/Codes/train.py", line 3, in import model_sphere_autoencoder File "/nfs/nas4/sirocco-intercom/sirocco-intercom/Codes/model_sphere_autoencoder.py", line 3, in import torch_geometric.nn as nn_torch_geometric File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_geometric/init.py", line 2, in import torch_geometric.nn File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_geometric/nn/init.py", line 10, in from .models import * # noqa File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_geometric/nn/models/init.py", line 2, in from .node2vec import Node2Vec File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/torch_geometric/nn/models/node2vec.py", line 2, in from sklearn.linear_model import LogisticRegression File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/sklearn/init.py", line 81, in from . import check_build # noqa: F401 File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/sklearn/check_build/init.py", line 46, in raise_build_error(e) File "/nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/sklearn/__check_build/init.py", line 41, in raise_build_error %s""" % (e, local_dir, ''.join(dir_content).strip(), msg)) ImportError: dlopen: cannot load any more object with static TLS


Contents of /nfs/nas4/sirocco-intercom/sirocco-intercom/python3-virtual-env/pytorch1.4_healpy/lib/python3.6/site-packages/sklearn/check_build: _check_build.cpython-36m-x86_64-linux-gnu.sosetup.py init.py pycache__


It seems that scikit-learn has not been built correctly.

If you have installed scikit-learn from source, please do not forget to build the package before using it: run python setup.py install or make in the source directory.

If you have used an installer, please check that it is suited for your Python version, your operating system and your platform.