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

Cannot install package. #6

Open
sshish opened this issue May 16, 2024 · 4 comments
Open

Cannot install package. #6

sshish opened this issue May 16, 2024 · 4 comments

Comments

@sshish
Copy link

sshish commented May 16, 2024

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
Copy link
Collaborator

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
Copy link
Author

sshish commented May 17, 2024

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
Copy link
Author

sshish commented May 17, 2024

I got it to work. This required following steps:

  • installing cython
  • setting / downgrading pip to version 22.0.1
  • installing the package "explicitly" via pip install git+https://github.com/fgnt/sed_scores_eval.git (if i instead put git+https://github.com/fgnt/sed_scores_eval.git into my requirements.txt file and try to install via pip install -r requirements.txt i receive the same error message)

@boeddeker
Copy link
Member

@JanekEbb Maybe you have to add the pyproject file.
I forgot to document why, but in fgnt/pb_bss#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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants