sknetwork-team / scikit-network

Graph Algorithms
Other
602 stars 67 forks source link

Fails to install with pip in a venv on Mac #575

Closed tompkins-ct closed 1 month ago

tompkins-ct commented 2 months ago

Description

Install scikit-network via pip in a virtual environment. Error related to missing requirement (numpy). However, numpy is already installed in the venv (v2.0.0).

What I Did

(.venv) ~/PycharmProjects/heaterControl git:[main]
pip install scikit-network
Collecting scikit-network
  Using cached scikit-network-0.31.0.tar.gz (1.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File ".../.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File ".../.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File ".../.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/k3/wxxjty1x75dcnfdx4pjdvcnh0000gn/T/pip-build-env-cuhs3urj/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/k3/wxxjty1x75dcnfdx4pjdvcnh0000gn/T/pip-build-env-cuhs3urj/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/k3/wxxjty1x75dcnfdx4pjdvcnh0000gn/T/pip-build-env-cuhs3urj/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/k3/wxxjty1x75dcnfdx4pjdvcnh0000gn/T/pip-build-env-cuhs3urj/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 12, in <module>
      ModuleNotFoundError: No module named 'numpy'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
QLutz commented 2 months ago

Thanks for bringing this up. Do you have an Intel-based or Apple Silicon Mac?

tompkins-ct commented 2 months ago

Apple Silicon, M2 Pro

tbonald commented 1 month ago

This is because Python 3.12 is not yet supported. To be solved with the next release (in the coming days). Thanks.