fgnt / sed_scores_eval

MIT License
27 stars 5 forks source link

Cannot install package. #6

Open sshish opened 4 months ago

sshish commented 4 months ago

pip install git+https://github.com/fgnt/sed_scores_eval.git yields

Collecting git+https://github.com/fgnt/sed_scores_eval.git
  Cloning https://github.com/fgnt/sed_scores_eval.git to /tmp/pip-req-build-bjd_pro9
  Running command git clone --quiet https://github.com/fgnt/sed_scores_eval.git /tmp/pip-req-build-bjd_pro9
  Resolved https://github.com/fgnt/sed_scores_eval.git to commit 48d5664b34c0c2fcfac78427a0c9c87980fe1190
  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
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "/data_pool/IDMT-WORKSPACE/DATA-STORE/skn/SemiAutomaticAnnotation/env/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/data_pool/IDMT-WORKSPACE/DATA-STORE/skn/SemiAutomaticAnnotation/env/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/data_pool/IDMT-WORKSPACE/DATA-STORE/skn/SemiAutomaticAnnotation/env/lib/python3.9/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-afih3q6s/overlay/lib/python3.9/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-afih3q6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-afih3q6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-afih3q6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 10, 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.

Python version: 3.9.18 numpy version: 1.20.0

JanekEbb commented 4 months ago

looks like the environment you are trying to install it in doesn't have numpy installed. Can you double check which environment you are using by which pip and make sure that numpy and cython is installed in there?

sshish commented 4 months ago

which pip points to the correct environment, with numpy installed. After reading your comment, I also installed cython, but this didn't solve the problem, unfortunately: i get exactly the same output when trying to install sed_scores_eval.

sshish commented 4 months ago

I got it to work. This required following steps:

boeddeker commented 4 months ago

@JanekEbb Maybe you have to add the pyproject file. I forgot to document why, but in https://github.com/fgnt/pb_bss/pull/40 I added it for pb_bss.

Maybe it was because of pip 23.1, where they changed some stuff (https://pip.pypa.io/en/stable/news/)

23.1 (2023-04-15) Remove setup.py install fallback when building a wheel failed for projects without pyproject.toml. (#8368) When the wheel package is not installed, pip now uses the default build backend instead of setup.py install and setup.py develop for project without pyproject.toml. (#8559)