-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
NumPy does not install on Python 3.12.0b1 #23808
Comments
We deliberately pin setuptools to work around other problems with numpy.distutils. The plan for python 3.12 is to move to the meson build system, and to deprecate use of setuptools. You can try out the meson build using python3.12 -m pip install -r build_requirements.txt; python3.12 -m spin build. |
Thanks, understood! I just came across https://numpy.org/devdocs/reference/distutils_status_migration.html, which reads
I agree in principle, but I feel that this approach may deadlock if many other projects depend on numpy :) for example, matplotlib does not install on 3.12.0b1 because it depends on numpy at build time, and then that dependency is carried further to all projects depending on matplotlib. |
That advice could use an update, especially before the 1.25 release freezes the documentation. SciPy has migrated to meson-python, and NumPy should migrate soon. Rather than trying to get setuptools to work with python3.12, we should start testing the CPython 3.12b1 with meson. |
Could you open an issue for that? I am going to release 1.25.0rc1 without it, but there will still be time before the final. |
Maybe we should be uploading pre-release wheels to https://anaconda.org/scientific-python-nightly-wheels/numpy. It seems cibuildwheel has a option for this |
I think now that Re uploading a nightly: let's consider it once NumPy actually passes its test suite with a CPython beta? It seems too early now, we don't even run it in our own CI yet. |
We need SIMD testing to work to make the transition. |
That can still be done with |
This is being done in gh-23838 - which is close, but needs working through some CI failures. Until it is merged, one can either use the branch from which I made that PR, or follow the instructions at https://github.com/numpy/numpy/blob/main/building_with_meson.md#pip-install. Questions about this continue to come in, so I'll pin this issue. |
Congratulations on getting #23838 in! What are the next steps in Python 3.12 support? |
Uploading nightlies to https://anaconda.org/scientific-python-nightly-wheels, so other projects can use those. PR for that is up, I'll update here once they're available. |
Wheels for Python 312 x86-64 (macOS, Windows, manylinux and musllinux) are up on https://anaconda.org/scientific-python-nightly-wheels/numpy/files. The rest (arm64/aarch64) should land as well by tomorrow when the next scheduled wheel build on Cirrus CI runs. |
Is there any recommendation for how downstream(e.g. pandas) should build Python 3.12 wheels? We can't build with the tarball of numpy 1.25 since that uses an ancient setuptools not compatible with Python 3.12, and I don't like the sound of building wheels using a random numpy nightly. If numpy 2.0 (or whatever the next version is) comes a couple months before Python 3.12 final, I guess it's no big deal, but if not, maybe it might be good to backport #23838? |
- Limited NumPy version to at least 1.26.0 to fix an error with Python 3.12, numpy/numpy#23808. - Updated poetry.lock.
- Run tests on CI on Python 3.12. - Limited NumPy version to at least 1.26.0 to fix an error with Python 3.12, numpy/numpy#23808. - Updated poetry.lock.
…mpy/numpy#23808" This reverts commit 9ccd199.
This reverts commit 96a33fc.
numpy.distutils, see numpy/numpy#23808
Numpy 1.24 build is broken on Python 3.12 [1]. 1.26.2 seems to be the first version that fixes it. [1] numpy/numpy#23808 Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
…n 3.18.1 Bartosz Sławecki (1): Tweak coverage configuration for type checking (jaraco/skeleton#97) Christian Clauss (2): Upgrade GitHub Actions checkout (jaraco/skeleton#94) GitHub Actions: Combine tox jobs diffcov and docs (jaraco/skeleton#95) Dimitri Papadopoulos Orfanos (2): Use the ruff formatter (jaraco/skeleton#99) ruff: extended-ignore → ignore (jaraco/skeleton#105) Jason R. Coombs (36): Limit sphinxlint jobs to 1. Workaround for sphinx-contrib/sphinx-lint#83. Remove news fragment after allowing time to be processed downstream. Suppress deprecation warning in dateutil. Workaround for dateutil/dateutil#1284. Update Github Actions badge per actions/starter-workflows#1525. Separate collateral jobs on different lines for easier override/extension. Revert "Disable tests on Windows due to numpy doesn't install. Ref numpy/numpy#23808" Revert "Grab later build of numpy; workaround for numpy/numpy#23808." Add support for newlines and fullmatch in glob.translate to match behavior in fnmatch.translate. Add support for arbitrary separators in glob.Translator, defaulting to os.sep + os.altsep. Prevent ** from appearing as anything but a full path segment for alignment with glob. Prevent * from matching an empty segment Fix initializer so it actually honors the parameter. Add tests for invalid separators. Update changelog. Drop minimum requirement on pytest-mypy as most environments are already running much later. Closes jaraco/skeleton#96. Remove sole entry for branches-ignore. Workaround for and closes jaraco/skeleton#103. Bump year on badge Remove build and dist from excludes. It appears they are not needed and their presence blocks the names of packages like 'builder' and 'distutils'. Ref pypa/distutils#224. Exclude docs and tests directories properly per Setuptools behavior. Rely on default discovery for good heuristics for finding packages. Enable preview to enable preserving quotes. Use latest versions in RTD boilerplate. Remove Sphinx pin. Ref sphinx-doc/sphinx#11662. Include deps from the base config in diffcov. Enable complexity check and pycodestyle warnings. Closes jaraco/skeleton#110. Use 'extend-select' to avoid disabling the default config. Ref jaraco/skeleton#110. Moved compatibility module to compat package. Fix name generator for width=1 Add another test at another magnitude. Add special accounting for pypy when computing the stack level for text encoding warnings. Bypass ZipFile.namelist in glob. Closes #106. Add news fragment. Finalize Move changelog entry, saved to the wrong location :( Merge changelog into last release. Finalize Sviatoslav Sydorenko (1): Enable testing merge queues @ GitHub Actions CI/CD (jaraco/skeleton#93)
Python 3.12 no longer supports numpy 1.23. See numpy/numpy#23808 for details.
Describe the issue:
Related:
pypa/pip#11501 (comment)
pypa/setuptools#3935
https://github.com/numpy/numpy/blob/cc0abd768575d7f9e862de0b4912af27f6e9690d/pyproject.toml#LL7C6-L7C16
Reproduce the code example:
Error message:
Runtime information:
Cannot install numpy :)
Python 3.12.0b1 on Windows 10 21H2
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: