-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Cannot pip install numpy on mac M1 #18195
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
RuntimeError: Broken toolchain: cannot link a simple C program |
Why are you installing from source? |
Sorry I might not understand this 100%, but we have a requirements.txt file in my repository with numpy being in it. When i run |
Pip is using a cached zip file, e.g., a file of source code. You can force it to use binary wheels
But the question is where the zip file came from, and if you are on a supported platform. What hardware? |
It can't find the binary it seems. When i use the command Here are my specs: |
Duplicate of #18160, #18143. You should have led with the data point that you are using the new Apple Silicon M1 hardware. We don't currently support that hardware until we can run CI on it. You may have more luck with conda, I think they have binary packages for M1. In the meantime you can use the x86_64 Rosetta emulation. |
One year later still can't compile Numpy on M1? I got this:
|
If any future M1 users come across this, but their error was related to installing in docker, they can try adding the following argument to your This resolved my issue with this error when using Docker. |
need help, same error |
@komal-sharan this issue is closed and we now have wheels for M1. Please open a new issue with full information about
|
For Ubuntu install the needed packages: sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran |
Cannot pip install numpy.
Reproducing code example:
python -m pip install numpy
Error message:
Collecting numpy
Using cached numpy-1.19.5.zip (7.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /Users/jeffstewart/maroon-bells/venv/bin/python /Users/jeffstewart/maroon-bells/venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/6q/jk0p94b12x713m1c02tyt1fc0000gn/T/tmpvko_1s0y
cwd: /private/var/folders/6q/jk0p94b12x713m1c02tyt1fc0000gn/T/pip-install-cgcf8n0u/numpy_f7d15ee151114f0aa52d02ed62f75e3c
Complete output (185 lines):
Running from numpy source directory.
setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_philox.pyx
Processing numpy/random/_bounded_integers.pyx.in
Processing numpy/random/_sfc64.pyx
Processing numpy/random/_mt19937.pyx
Processing numpy/random/bit_generator.pyx
Processing numpy/random/mtrand.pyx
Processing numpy/random/_generator.pyx
Processing numpy/random/_pcg64.pyx
Processing numpy/random/_common.pyx
Cythonizing sources
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/Users/jeffstewart/maroon-bells/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
ERROR: Command errored out with exit status 1: /Users/jeffstewart/maroon-bells/venv/bin/python /Users/jeffstewart/maroon-bells/venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/6q/jk0p94b12x713m1c02tyt1fc0000gn/T/tmpvko_1s0y Check the logs for full command output.
NumPy/Python version information:
Numpy version 1.19.5
Python version 3.9.1
macOS Big Sur 11.1 (Apple Silicon)
The text was updated successfully, but these errors were encountered: