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

Installation fails due to ERROR: Could not find a version that satisfies the requirement pyg-lib on macOS #211

Closed
Mars-Mah3r opened this issue Mar 8, 2023 · 15 comments

Comments

@Mars-Mah3r
Copy link

Mars-Mah3r commented Mar 8, 2023

😵 cant install pyg

Everytime i use the command:
pip install pyg-lib -f https://data.pyg.org/whl/torch-1.13.1+cpu.html
I get the error message
ERROR: Could not find a version that satisfies the requirement pyg-lib (from versions: none) ERROR: No matching distribution found for pyg-lib

Environment

  • pyg-lib version: n/a
  • PyTorch version: 1.13.1
  • OS: Mac OS Version 13.2.1
  • Python version: 3.10.5
  • CUDA/cuDNN version: n/a
  • How you installed PyTorch and pyg-lib (conda, pip, source): pip
  • Any other relevant information:
@rusty1s
Copy link
Member

rusty1s commented Mar 8, 2023

Yeah, that's because we don't yet provide pre-built M1 wheels, and pyg-lib is not yet on PyPi. You can try to run via

pip install git+https://github.com/pyg-team/pyg-lib.git

@Mars-Mah3r
Copy link
Author

Mars-Mah3r commented Mar 8, 2023

Yeah, that's because we don't yet provide pre-built M1 wheels, and pyg-lib is not yet on PyPi. You can try to run via

pip install git+https://github.com/pyg-team/pyg-lib.git

now i get this error:

mars@Mars-MacBook-Pro ~ % pip install git+https://github.com/pyg-team/pyg-lib.git --use-pep517 
Collecting git+https://github.com/pyg-team/pyg-lib.git
  Cloning https://github.com/pyg-team/pyg-lib.git to /private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-req-build-3z23ydr9
  Running command git clone --filter=blob:none --quiet https://github.com/pyg-team/pyg-lib.git /private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-req-build-3z23ydr9
  Resolved https://github.com/pyg-team/pyg-lib.git to commit 76ef32a22cb43e9f1bb66a0298acfa13f48ef23e
  Running command git submodule update --init --recursive -q
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyg-lib
  Building wheel for pyg-lib (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyg-lib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [70 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-cpython-310
      creating build/lib.macosx-10.9-universal2-cpython-310/pyg_lib
      copying pyg_lib/home.py -> build/lib.macosx-10.9-universal2-cpython-310/pyg_lib
      copying pyg_lib/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/pyg_lib
      copying pyg_lib/testing.py -> build/lib.macosx-10.9-universal2-cpython-310/pyg_lib
      copying pyg_lib/_triton.py -> build/lib.macosx-10.9-universal2-cpython-310/pyg_lib
      creating build/lib.macosx-10.9-universal2-cpython-310/pyg_lib/sampler
      copying pyg_lib/sampler/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/pyg_lib/sampler
      creating build/lib.macosx-10.9-universal2-cpython-310/pyg_lib/ops
      copying pyg_lib/ops/scatter_reduce.py -> build/lib.macosx-10.9-universal2-cpython-310/pyg_lib/ops
      copying pyg_lib/ops/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/pyg_lib/ops
      running build_ext
      Traceback (most recent call last):
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 413, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 398, in _build_with_temp_dir
          self.run_setup()
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 484, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 132, in <module>
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 325, in run
          self.run_command("build")
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 84, in run
          _build_ext.run(self)
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "/private/var/folders/gq/qt59drb965v4rlchdht8jmzr0000gn/T/pip-build-env-qtvj84s5/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "<string>", line 41, in build_extension
      ModuleNotFoundError: No module named 'torch'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyg-lib
Failed to build pyg-lib
ERROR: Could not build wheels for pyg-lib, which is required to install pyproject.toml-based projects
mars@Mars-MacBook-Pro ~ % 

@rusty1s
Copy link
Member

rusty1s commented Mar 10, 2023

You need to install PyTorch beforehand before being able to install pyg-lib from source.

@Mars-Mah3r
Copy link
Author

You need to install PyTorch beforehand before being able to install pyg-lib from source.

Pytorch is installed

@rusty1s
Copy link
Member

rusty1s commented Mar 10, 2023

I am a bit confused. We currently don't use pyproject.toml for pyg-lib. Not totally sure why it complains about it TBH.

@Joe-Miccio
Copy link

Joe-Miccio commented Mar 14, 2023

I meet this error on my m1 mac:
>>> import pyg_lib Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/pyg_lib/__init__.py", line 38, in <module> load_library('libpyg') File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/pyg_lib/__init__.py", line 35, in load_library torch.ops.load_library(spec.origin) File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/torch/_ops.py", line 573, in load_library ctypes.CDLL(path) File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/ctypes/__init__.py", line 374, in __init__ self._handle = _dlopen(self._name, mode) OSError: dlopen(/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/libpyg.so, 0x0006): Library not loaded: '/Users/runner/hostedtoolcache/Python/3.10.8/x64/lib/libpython3.10.dylib' Referenced from: '/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/libpyg.so' Reason: tried: '/Users/runner/hostedtoolcache/Python/3.10.8/x64/lib/libpython3.10.dylib' (no such file), '/usr/local/lib/libpython3.10.dylib' (no such file), '/usr/lib/libpython3.10.dylib' (no such file)
my ENV INFO:

  • torch 1.13.0 pypi_0 pypi
  • torch-cluster 1.6.0 pypi_0 pypi
  • torch-geometric 2.2.0 pypi_0 pypi
  • torch-scatter 2.1.0 pypi_0 pypi
  • torch-sparse 0.6.16 pypi_0 pypi
  • torchaudio 0.13.0 pypi_0 pypi
  • torchvision 0.14.0 pypi_0 pypi
  • python 3.10.9 h218abb5_2
  • python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
  • python_abi 3.10 2_cp310 conda-forge
  • pyg-lib 0.1.0+pt113 pypi_0 pypi

@Joe-Miccio
Copy link

I meet this error on my m1 mac: >>> import pyg_lib Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/pyg_lib/__init__.py", line 38, in <module> load_library('libpyg') File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/pyg_lib/__init__.py", line 35, in load_library torch.ops.load_library(spec.origin) File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/torch/_ops.py", line 573, in load_library ctypes.CDLL(path) File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/ctypes/__init__.py", line 374, in __init__ self._handle = _dlopen(self._name, mode) OSError: dlopen(/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/libpyg.so, 0x0006): Library not loaded: '/Users/runner/hostedtoolcache/Python/3.10.8/x64/lib/libpython3.10.dylib' Referenced from: '/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/libpyg.so' Reason: tried: '/Users/runner/hostedtoolcache/Python/3.10.8/x64/lib/libpython3.10.dylib' (no such file), '/usr/local/lib/libpython3.10.dylib' (no such file), '/usr/lib/libpython3.10.dylib' (no such file) my ENV INFO:

  • torch 1.13.0 pypi_0 pypi
  • torch-cluster 1.6.0 pypi_0 pypi
  • torch-geometric 2.2.0 pypi_0 pypi
  • torch-scatter 2.1.0 pypi_0 pypi
  • torch-sparse 0.6.16 pypi_0 pypi
  • torchaudio 0.13.0 pypi_0 pypi
  • torchvision 0.14.0 pypi_0 pypi
  • python 3.10.9 h218abb5_2
  • python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
  • python_abi 3.10 2_cp310 conda-forge
  • pyg-lib 0.1.0+pt113 pypi_0 pypi

i checked the install infomation and found that when i use pip install pyg-lib -f https://data.pyg.org/whl/torch-1.13.0+cpu.html to install pyg_lib, it shows :Using cached https://data.pyg.org/whl/torch-1.13.0%2Bcpu/pyg_lib-0.1.0%2Bpt113-cp310-cp310-macosx_10_15_x86_64.whl (638 kB), it installed the x86_64 version, not the arm64 version.

@Joe-Miccio
Copy link

Joe-Miccio commented Mar 14, 2023

reinstalled the python3.7:

  • python 3.7.16 h218abb5_0
  • torch 1.13.0 pypi_0 pypi
  • torch-cluster 1.6.0 pypi_0 pypi
  • torch-geometric 2.2.0 pypi_0 pypi
  • torch-scatter 2.1.0 pypi_0 pypi
  • torch-sparse 0.6.16 pypi_0 pypi
  • torch-spline-conv 1.2.1 pypi_0 pypi
  • torchaudio 0.13.0 pypi_0 pypi
  • torchvision 0.14.0 pypi_0 py
  • pyg-lib 0.1.0+pt113 pypi_0 pypi

still have same error:

import pyg_lib
Traceback (most recent call last):
File "", line 1, in
File "/opt/homebrew/anaconda3/envs/py37/lib/python3.7/site-packages/pyg_lib/init.py", line 38, in
load_library('libpyg')
File "/opt/homebrew/anaconda3/envs/py37/lib/python3.7/site-packages/pyg_lib/init.py", line 35, in load_library
torch.ops.load_library(spec.origin)
File "/opt/homebrew/anaconda3/envs/py37/lib/python3.7/site-packages/torch/_ops.py", line 573, in load_library
ctypes.CDLL(path)
File "/opt/homebrew/anaconda3/envs/py37/lib/python3.7/ctypes/init.py", line 364, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/opt/homebrew/anaconda3/envs/py37/lib/python3.7/site-packages/libpyg.so, 0x0006): Library not loaded: '/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/Python'
Referenced from: '/opt/homebrew/anaconda3/envs/py37/lib/python3.7/site-packages/libpyg.so'
Reason: tried: '/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.10/Python' (no such file), '/System/Library/Frameworks/Python.framework/Versions/3.10/Python' (no such file)

i installed pyg_lib by wheel this time 'pyg_lib-0.1.0+pt113-cp37-cp37m-macosx_10_15_x86_64.whl'

@rusty1s
Copy link
Member

rusty1s commented Mar 15, 2023

Yes, wheel support for M1 is not supported at the moment. You would need to install from source for pyg-lib on M1.

@semihcanturk
Copy link

Hmm, @Joe-Miccio 's error may not be limited to M1 Macs -- I'm also getting the same error, but on an Intel Mac. Any ideas?

I meet this error on my m1 mac: >>> import pyg_lib Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/pyg_lib/__init__.py", line 38, in <module> load_library('libpyg') File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/pyg_lib/__init__.py", line 35, in load_library torch.ops.load_library(spec.origin) File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/torch/_ops.py", line 573, in load_library ctypes.CDLL(path) File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/ctypes/__init__.py", line 374, in __init__ self._handle = _dlopen(self._name, mode) OSError: dlopen(/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/libpyg.so, 0x0006): Library not loaded: '/Users/runner/hostedtoolcache/Python/3.10.8/x64/lib/libpython3.10.dylib' Referenced from: '/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/libpyg.so' Reason: tried: '/Users/runner/hostedtoolcache/Python/3.10.8/x64/lib/libpython3.10.dylib' (no such file), '/usr/local/lib/libpython3.10.dylib' (no such file), '/usr/lib/libpython3.10.dylib' (no such file) my ENV INFO:

  • torch 1.13.0 pypi_0 pypi
  • torch-cluster 1.6.0 pypi_0 pypi
  • torch-geometric 2.2.0 pypi_0 pypi
  • torch-scatter 2.1.0 pypi_0 pypi
  • torch-sparse 0.6.16 pypi_0 pypi
  • torchaudio 0.13.0 pypi_0 pypi
  • torchvision 0.14.0 pypi_0 pypi
  • python 3.10.9 h218abb5_2
  • python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
  • python_abi 3.10 2_cp310 conda-forge
  • pyg-lib 0.1.0+pt113 pypi_0 pypi

@rusty1s
Copy link
Member

rusty1s commented Mar 22, 2023

Looks like your system cannot find your python env. Can you add it to DYLD_LIBRARY_PATH?

@Joe-Miccio
Copy link

Hmm, @Joe-Miccio 's error may not be limited to M1 Macs -- I'm also getting the same error, but on an Intel Mac. Any ideas?

I meet this error on my m1 mac: >>> import pyg_lib Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/pyg_lib/__init__.py", line 38, in <module> load_library('libpyg') File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/pyg_lib/__init__.py", line 35, in load_library torch.ops.load_library(spec.origin) File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/torch/_ops.py", line 573, in load_library ctypes.CDLL(path) File "/opt/homebrew/anaconda3/envs/test/lib/python3.10/ctypes/__init__.py", line 374, in __init__ self._handle = _dlopen(self._name, mode) OSError: dlopen(/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/libpyg.so, 0x0006): Library not loaded: '/Users/runner/hostedtoolcache/Python/3.10.8/x64/lib/libpython3.10.dylib' Referenced from: '/opt/homebrew/anaconda3/envs/test/lib/python3.10/site-packages/libpyg.so' Reason: tried: '/Users/runner/hostedtoolcache/Python/3.10.8/x64/lib/libpython3.10.dylib' (no such file), '/usr/local/lib/libpython3.10.dylib' (no such file), '/usr/lib/libpython3.10.dylib' (no such file) my ENV INFO:

  • torch 1.13.0 pypi_0 pypi
  • torch-cluster 1.6.0 pypi_0 pypi
  • torch-geometric 2.2.0 pypi_0 pypi
  • torch-scatter 2.1.0 pypi_0 pypi
  • torch-sparse 0.6.16 pypi_0 pypi
  • torchaudio 0.13.0 pypi_0 pypi
  • torchvision 0.14.0 pypi_0 pypi
  • python 3.10.9 h218abb5_2
  • python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
  • python_abi 3.10 2_cp310 conda-forge
  • pyg-lib 0.1.0+pt113 pypi_0 pypi

I installed pyg by this rusty1s/pytorch_scatter#241 (comment), and its helpful.
The pyg_lib is installed by pip install pyg-lib -f https://data.pyg.org/whl/nightly/torch-${TORCH}+${CUDA}.html

pytorch version = 1.13.0, not sure whether different version is work. Maybe this can help you.

@ksmdnl
Copy link

ksmdnl commented Jul 19, 2023

Yes, wheel support for M1 is not supported at the moment. You would need to install from source for pyg-lib on M1.

I tried installing it from source but it didn't work either.

pip install git+https://github.com/pyg-team/pyg-lib.git
Collecting git+https://github.com/pyg-team/pyg-lib.git
  Cloning https://github.com/pyg-team/pyg-lib.git to /private/var/folders/bl/j35v6zps6yvgx5y0nwp4h7080000gn/T/pip-req-build-stsb4s67
  Running command git clone --filter=blob:none --quiet https://github.com/pyg-team/pyg-lib.git /private/var/folders/bl/j35v6zps6yvgx5y0nwp4h7080000gn/T/pip-req-build-stsb4s67
  Resolved https://github.com/pyg-team/pyg-lib.git to commit 029193467fe4ec61516e78859b7a8cfde3c40919
  Running command git submodule update --init --recursive -q
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyg-lib
  Building wheel for pyg-lib (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-310
      creating build/lib.macosx-11.0-arm64-cpython-310/pyg_lib
      copying pyg_lib/home.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib
      copying pyg_lib/__init__.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib
      copying pyg_lib/testing.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib
      copying pyg_lib/_triton.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib
      creating build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/sampler
      copying pyg_lib/sampler/__init__.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/sampler
      creating build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/ops
      copying pyg_lib/ops/scatter_reduce.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/ops
      copying pyg_lib/ops/__init__.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/ops
      creating build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/partition
      copying pyg_lib/partition/__init__.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/partition
      running build_ext
      /private/var/folders/bl/j35v6zps6yvgx5y0nwp4h7080000gn/T/pip-req-build-stsb4s67/setup.py:77: UserWarning: Building times of 'pyg-lib' can be heavily improved by installing 'ninja': `pip install ninja`
        warnings.warn("Building times of 'pyg-lib' can be heavily improved"
      error: [Errno 2] No such file or directory: 'cmake'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyg-lib
  Running setup.py clean for pyg-lib
Failed to build pyg-lib
ERROR: Could not build wheels for pyg-lib, which is required to install pyproject.toml-based projects```

@ksmdnl
Copy link

ksmdnl commented Jul 20, 2023

Yes, wheel support for M1 is not supported at the moment. You would need to install from source for pyg-lib on M1.

I tried installing it from source but it didn't work either.

pip install git+https://github.com/pyg-team/pyg-lib.git
Collecting git+https://github.com/pyg-team/pyg-lib.git
  Cloning https://github.com/pyg-team/pyg-lib.git to /private/var/folders/bl/j35v6zps6yvgx5y0nwp4h7080000gn/T/pip-req-build-stsb4s67
  Running command git clone --filter=blob:none --quiet https://github.com/pyg-team/pyg-lib.git /private/var/folders/bl/j35v6zps6yvgx5y0nwp4h7080000gn/T/pip-req-build-stsb4s67
  Resolved https://github.com/pyg-team/pyg-lib.git to commit 029193467fe4ec61516e78859b7a8cfde3c40919
  Running command git submodule update --init --recursive -q
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyg-lib
  Building wheel for pyg-lib (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-310
      creating build/lib.macosx-11.0-arm64-cpython-310/pyg_lib
      copying pyg_lib/home.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib
      copying pyg_lib/__init__.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib
      copying pyg_lib/testing.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib
      copying pyg_lib/_triton.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib
      creating build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/sampler
      copying pyg_lib/sampler/__init__.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/sampler
      creating build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/ops
      copying pyg_lib/ops/scatter_reduce.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/ops
      copying pyg_lib/ops/__init__.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/ops
      creating build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/partition
      copying pyg_lib/partition/__init__.py -> build/lib.macosx-11.0-arm64-cpython-310/pyg_lib/partition
      running build_ext
      /private/var/folders/bl/j35v6zps6yvgx5y0nwp4h7080000gn/T/pip-req-build-stsb4s67/setup.py:77: UserWarning: Building times of 'pyg-lib' can be heavily improved by installing 'ninja': `pip install ninja`
        warnings.warn("Building times of 'pyg-lib' can be heavily improved"
      error: [Errno 2] No such file or directory: 'cmake'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyg-lib
  Running setup.py clean for pyg-lib
Failed to build pyg-lib
ERROR: Could not build wheels for pyg-lib, which is required to install pyproject.toml-based projects```

UPDATE: Installing rdkit seems to solve the issue somehow.

@rusty1s
Copy link
Member

rusty1s commented Jul 20, 2023

Yes, you need cmake for installation.

@akihironitta akihironitta changed the title cant seem to install on my m1 pro mac Installation fails due to ERROR: Could not find a version that satisfies the requirement pyg-lib on macOS Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants