PyPy 7.3.7 & MacOS 11.x: Numpy fails to build, but only as a build dependency when `--use-pep517` is active.
See original GitHub issueDescription
Under PyPy 7.3.7, Numpy can be built and installed from source with pip install numpy
, but it fails to build when being used as a PEP 517 build dependency, with an assertion error about an unsupported tag ('pp37', 'pypy37_pp73', 'macosx_10_7_x86_64')
.
However, it does appear to work with the --no-use-pep517
flag (at least, it proceeds beyond Numpy and fails anyway because Cython is not available).
Expected behavior
I expected Numpy to work as a PEP 517 build dependency, because it works when I install it as a regular dependency
pip version
pip 21.3.1
Python version
PyPy 7.3.7 (3.7)
OS
MacOS 11.6.1
How to Reproduce
/usr/local/bin/pypy3 --version
# Python 3.7.12 (44db26267d0a38e51a7e8490983ed7e7bcb84b74, Oct 28 2021, 05:11:03)
# [PyPy 7.3.7 with GCC Apple LLVM 13.0.0 (clang-1300.0.29.3)]
/usr/local/bin/pypy3 -m venv ./my-project
./my-project/bin/python -m pip install -U pip setuptools wheel
This works fine:
./my-project/bin/python -m pip install numpy
This does not:
./my-project/bin/python -m pip install -U scipy
But this works fine (until it hits the unrelated Cython error):
./my-project/bin/python -m pip install --no-use-pep517 -U scipy
Output
< ... huge build log and traceback ... >
AssertionError: would build wheel with unsupported tag ('pp37', 'pypy37_pp73', 'macosx_10_7_x86_64')
----------------------------------------
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
----------------------------------------
Code of Conduct
- I agree to follow the PSF Code of Conduct.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
python 3.x - numpy build fail in M1 Big sur 11.1 - Stack Overflow
I have tested it on my M1 with Python 3.9.2, macOS Big Sur (11.5.1), and pip 21.1.3. Just use pip/pip3 to install it....
Read more >Error installing numpy on m1 Mac using terminal - Python
I get an error trying to install numpy via terminal on m1 mac, Big Sur V11.2.3. Does anyone have any ideas on how...
Read more >Frequently Asked Questions - PyPy documentation
Does PyPy have a GIL? Why? What about numpy, numpypy, micronumpy? Should I install numpy or numpypy? Is PyPy more clever than CPython...
Read more >could not build wheels for numpy, which is required to install ...
Under PyPy 7.3.7, Numpy can be built and installed from source with pip install numpy , but it fails to build when being...
Read more >Installing scipy fails with "Error: 'None' must be ... - Heptapod
I'm trying to install scipy and get it working with pypy. ... MB) Installing build dependencies ... done Getting requirements to build wheel ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The tag
pp37-pypy37_pp73-macosx_10_7_x86_64
is listed in the previously attachedpip debug
output, so that tag is fine from pip’s perspective. It’s likely a bug inwheel
; the would build wheel with unsupported tag was emitted by it.Slightly OT. I was having a similar issue, but it was unrelated to the
--use-pep517
: I couldn’t install numpy on macOS 12.2.1 Monterey, not even with a simplepip install numpy
. My configuration:And the final output error was the same:
I first ran
brew doctor
, which showed that my Command Line Tools (XCode) were outdated. Then I just followed the instructions to update them:This solved the issue.
I hope this might help others that get here looking for a solution.