-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
QST: Install from source without blas with pip #24703
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
Comments
Is this a duplicate of #24704? I think the problem is that the project has a test dependency on NumPy and ends up building from source instead of using pre-built wheels. |
Besides the "wheels are coming", the answer to the question when you build from source is (as hinted at in the error message) that this works: $ # the -C syntax requires pip 23.1; for older pip versions replace it with --config-settings=
$ pip install numpy -C-Dallow-noblas=true
$ # or with pypa/build from a local repo
$ python -m build -C-Dallow-noblas=true There is no environment variable to do the same thing. We may relax the requirement for having BLAS installed, but I think it'd be good to see how many people find the current state a problem with the final 1.26.0 release which will include 32-bit Windows wheels. |
While the question is answered, let's leave this issue open until at least a week after the 1.26.0 release date, so it's easier to discover for others. |
Thanks for the responses 👍
These failures are different because they are for pypy builds and for the i686 architecture. If the wheels are coming, this shouldn't be an issue. |
For anyone who runs into this - based on:
This is the syntax for pip:
|
This will be an issue for aarch64 users on musl based systems as numpy does not provide binary wheels for that. We (linuxserver.io) are facing that issue on our docker images that are alpine based with aarch64 images |
@aptalca thanks for that comment. To make sure I'm understanding it right: are you saying that you're seeing failed builds and that's a problem, or also that it's fine to avoid the failed builds by default by building fallback linear algebra routines that may be ~50x slower? |
Sorry, I should have clarified. We are seeing failed builds due to the newly enforced openblas requirement. Previously, numpy would build without openblas just fine. Now we have to either add openblas or add the build argument to allow building without openblas. In most cases (for us) the speed difference is not noticeable as the apps we build don't rely on complex calculations. |
* Update wheels.yml workflow to run on release event * Retry build failure [empty] * Try installing blas before builds * Allow numpy w/o BLAS in builds Ref: numpy/numpy#24703 * Fixup
I am trying to install: I get this error: ../../numpy/meson.build:207:4: ERROR: Problem encountered: No BLAS library detected! Install one, or use the A full log can be found at /tmp/pip-install-gmgwihuj/numpy_9524064cd0ae4863b894d750518a40a5/.mesonpy-utl0nn8j/build/meson-logs/meson-log.txt × Preparing metadata (pyproject.toml) did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while generating package metadata. note: This is an issue with the package mentioned above, not pip. [notice] A new release of pip is available: 23.2 -> 23.2.1 I tried to do this python update, but apparently it doesn't update either. I have no idea what to do. |
@Itsmittyhere what version of python are you using on what platform? Do you intend to build from source? You need to install the development version of a BLAS library. |
FWIW: I ran into this one while using cibuildwheel to build a package that relies on NumPy. Based on your discussion, I have to imagine there's some way of configuring [tool.cibuildwheel]
skip = ["pp*", "*i686"] to |
Thanks for the comment @fuglede. Using There's no config file or environment variable to set that can address this I believe. The way to do it would be to call |
Cannot build the latest NumPy 1.26.0 from source without BLAS (works with previous versions) on i686. Add custom before-test installation for NumPy: numpy/numpy#24703
NumPy does not provide wheels for i686 and they are built from source with pip for Essentia wheels builds. However, since Numpy 1.26.0, the build fails due to missing BLAS: numpy/numpy#24703 The simplest solution, similar to other projects, is to disable i686 builds entirely, given that the i686 is getting too outdated and uncommon.
NumPy does not provide wheels for i686 and they are built from source with pip for Essentia wheels builds. However, since Numpy 1.26.0, the build fails due to missing BLAS: numpy/numpy#24703 The simplest solution, similar to other projects, is to disable i686 builds entirely, given that the i686 is getting too outdated and uncommon.
See numpy/numpy#24703 for more information
@rgommers replacing |
It would be nice to debug why the CMake files supplied with openblas are not sufficient. Is there a command-line interface to the cmake module discovery mechanism? |
Just adding to the above comments, I just ran into the same problem trying to update a package I maintain (that depends on numpy) to work with Python 3.12. I tried everything I could think of, including adding the cibuildwheel pre-install of numpy with the |
@rfrenchseti try adding these packages before installing numpy.
Names may be different depending on which distro. |
Just for info, we face the same issue when doing CI on an architecture where no wheels are provided (PPC64le). |
Having it set to false caused more disruption and complaints than the silent performance regressions for `true` ever did. So now that the dust has settled a bit on the transition to Meson, go back to the more permissive default. The warning that is emitted when BLAS and/or LAPACK are not found is already much more visible than it was with distutils, so this new situation is still an improvement over where we were until 1.25.x. Closes numpygh-24703.
Thanks for the input everyone. I just opened gh-25063 to revert the default to |
Having it set to false caused more disruption and complaints than the silent performance regressions for `true` ever did. So now that the dust has settled a bit on the transition to Meson, go back to the more permissive default. The warning that is emitted when BLAS and/or LAPACK are not found is already much more visible than it was with distutils, so this new situation is still an improvement over where we were until 1.25.x. Closes numpygh-24703.
Having it set to false caused more disruption and complaints than the silent performance regressions for `true` ever did. So now that the dust has settled a bit on the transition to Meson, go back to the more permissive default. The warning that is emitted when BLAS and/or LAPACK are not found is already much more visible than it was with distutils, so this new situation is still an improvement over where we were until 1.25.x. Closes numpygh-24703.
numpy 1.26 before 1.26.2 enforced the presence of a blas library when building from source, e.g. on i686 ( numpy/numpy#24703 )
numpy 1.26 before 1.26.2 enforced the presence of a blas library when building from source, e.g. on i686 ( numpy/numpy#24703 )
For everybody running into that (like myself): This works only from numpy version 1.26.1! |
When trying out latest release candidate:
From: pyproj4/pyproj#1330 (comment)
Is there an environment variable you can set to not require blas when installing numpy?
The text was updated successfully, but these errors were encountered: