qmlcode / qml

QML: Quantum Machine Learning
MIT License
196 stars 84 forks source link

ModuleNotFoundError: No module named 'numpy' #149

Open UnixJunkie opened 1 month ago

UnixJunkie commented 1 month ago
Collecting qml@ git+https://github.com/qmlcode/qml@a7921c9176b9498dcce096efad0883271706d633
  Cloning https://github.com/qmlcode/qml (to revision a7921c9176b9498dcce096efad0883271706d633) to /tmp/pip-install-4nhanz7h/qml_b8a84c0a43fb4a789769c5dfb049f2df
  Running command git clone --quiet https://github.com/qmlcode/qml /tmp/pip-install-4nhanz7h/qml_b8a84c0a43fb4a789769c5dfb049f2df
  Running command git rev-parse -q --verify 'sha^a7921c9176b9498dcce096efad0883271706d633'
  Running command git fetch -q https://github.com/qmlcode/qml a7921c9176b9498dcce096efad0883271706d633
  Running command git checkout -q a7921c9176b9498dcce096efad0883271706d633
  Resolved https://github.com/qmlcode/qml to commit a7921c9176b9498dcce096efad0883271706d633
  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 "/home/berenger/src/MLKRR/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/berenger/src/MLKRR/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/berenger/src/MLKRR/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-0it_nql3/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-0it_nql3/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-0it_nql3/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-0it_nql3/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 2, in <module>
      ModuleNotFoundError: No module named 'numpy'
      [end of output]
UnixJunkie commented 1 month ago

I was trying to install via: python3.11 -m pip install qml@git+https://github.com/qmlcode/qml@a7921c9176b9498dcce096efad0883271706d633

UnixJunkie commented 1 month ago

The venv does have numpy-1.23.4 installed.

charnley commented 1 month ago

The build functionality from numpy/setup tools has been deprecated. A new version of the core QML library is currently under development https://github.com/qmlcode/qmllib. Some work is still needed, but the core functions (not parallel yet) do work.