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

Failed installation with newer python version (3.13.0) #236

Open
m-aguena opened this issue Nov 21, 2024 · 3 comments
Open

Failed installation with newer python version (3.13.0) #236

m-aguena opened this issue Nov 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@m-aguena
Copy link

Bug report

I created a new conda environment with python=3.13.0 to test the pip installation of qp and got the following error

pip install qp-prob
Collecting qp-prob
  Using cached qp_prob-0.9.1-py3-none-any.whl.metadata (6.7 kB)
Collecting numpy<2.0.0 (from qp-prob)
  Using cached numpy-1.26.4.tar.gz (15.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      + /home/aguena/miniconda3/envs/test/bin/python /tmp/pip-install-my35x7gk/numpy_df6561455c514a05bfbf8833498e6f23/vendored-meson/meson/meson.py setup /tmp/pip-install-my35x7gk/numpy_df6561455c514a05bfbf8833498e6f23 /tmp/pip-install-my35x7gk/numpy_df6561455c514a05bfbf8833498e6f23/.mesonpy-qzfe1xdw -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-my35x7gk/numpy_df6561455c514a05bfbf8833498e6f23/.mesonpy-qzfe1xdw/meson-python-native-file.ini
      The Meson build system
      Version: 1.2.99
      Source dir: /tmp/pip-install-my35x7gk/numpy_df6561455c514a05bfbf8833498e6f23
      Build dir: /tmp/pip-install-my35x7gk/numpy_df6561455c514a05bfbf8833498e6f23/.mesonpy-qzfe1xdw
      Build type: native build
      Project name: NumPy
      Project version: 1.26.4
      
      ../meson.build:1:0: ERROR: Unknown compiler(s): [['cc'], ['gcc'], ['clang'], ['nvc'], ['pgcc'], ['icc'], ['icx']]
      The following exception(s) were encountered:
      Running `cc --version` gave "[Errno 2] No such file or directory: 'cc'"
      Running `gcc --version` gave "[Errno 2] No such file or directory: 'gcc'"
      Running `clang --version` gave "[Errno 2] No such file or directory: 'clang'"
      Running `nvc --version` gave "[Errno 2] No such file or directory: 'nvc'"
      Running `pgcc --version` gave "[Errno 2] No such file or directory: 'pgcc'"
      Running `icc --version` gave "[Errno 2] No such file or directory: 'icc'"
      Running `icx --version` gave "[Errno 2] No such file or directory: 'icx'"
      
      A full log can be found at /tmp/pip-install-my35x7gk/numpy_df6561455c514a05bfbf8833498e6f23/.mesonpy-qzfe1xdw/meson-logs/meson-log.txt
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

BTW, the installation does work with a python=3.10.15 environment.

@m-aguena m-aguena added the bug Something isn't working label Nov 21, 2024
@sschmidt23
Copy link
Collaborator

Hmm, I just tried to duplicate, and on my Mac create a python env with conda create -n testqp python=3.13 and then doing a pip install qp-prob it installed correctly, including the same numpy-1.26.4 where you got an error. So, this may be somewhat system dependent. It does look like this is due to numpy not installing correctly via PyPI. The short term solution would be to conda install numpy<2.0 and then re-try the qp prob install. Overall, we seem to have better luck with installs of things with compiled libraries via conda, pip just occasionally fails to build. For example, I often get similar behavior to what you are seeing here for mpi4py installed via pip, but if I install via conda everything else goes smoothly.

@m-aguena
Copy link
Author

I see, thanks for the verification. It might be useful to have a note on that in case other people get the same issue.

@m-aguena
Copy link
Author

Btw, just reporting that I could not install numpy<2 with conda on the python 3.13 environment as well. In particular, for version 1.26.4, I get the error:

conda install -c conda-forge "numpy=1.26.4"
Channels:
 - conda-forge
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: - warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package numpy-1.26.4-py310hb13e2d6_0 requires python >=3.10,<3.11.0a0, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ numpy 1.26.4**  is installable with the potential options
│  ├─ numpy 1.26.4 would require
│  │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│  ├─ numpy 1.26.4 would require
│  │  └─ python >=3.11,<3.12.0a0 , which can be installed;
│  ├─ numpy 1.26.4 would require
│  │  └─ python >=3.12,<3.13.0a0 , which can be installed;
│  └─ numpy 1.26.4 would require
│     └─ python >=3.9,<3.10.0a0 , which can be installed;
└─ pin-1 is not installable because it requires
   └─ python 3.13.* , which conflicts with any installable versions previously reported.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants