-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: Error installing NumPy via Pip on macOS Big Sur with python from HomeBrew #17784
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
The binary wheel for python 3.9 on macOSx is available at https://pypi.org/project/numpy/#files for 1.19.4, as |
I have the same problem as @MarioCatuogno. I've tried running
I changed
but I still got following (probably the same as @MarioCatuogno) error when installing pandas:
EDIT: |
@mattip I've tried with the python3.9 -m pip install --only-binary=:all numpy==1.19.4 and I'm still getting the same error installing Pandas with PIP. |
The option
So somehow pip is not recognizing the binary wheels and is rebuilding the wheel from source, detecting the buggy local Accelerate library and binding it to NumPy. Now we need someone to find out why the python you are using decided that the |
@mattip I installed Python3.9 via Homebrew using "brew install python3" in Terminal. I did a clean installation of macOS Big Sur and the first thing I did was the setup of Homebrew and Python, no other apps or binaries installed. |
@mattip I installed it through |
Could you try with the python available in the link above instead of the homebrew one? Perhaps homebrew is rejecting our binary wheel. |
@mattip After installing Python from the link above, pandas (and numpy) installed correctly and everything seems to work fine. |
Over at homebrew they recommend users who install python via homebrew continue with that workflow and use |
There is also pypa/packaging#319. Packaging is vendored into pip, so if that PR goes in, and a new version of pip is released, and people start using it, this issue might get solved. |
@mattip So, as of today, the only way to install Pandas with pip is to uninstall Python3 installed via Homebrew and use the one from the Python website? |
I need to answer your question with a question, sorry: if you install numpy with |
@mattip Already tried with |
Here is another suggestion, based on the idea that the only problem is that the wheel has the wrong name. Can you download the appropriate wheel for your python version from https://pypi.org/project/numpy/#files, so |
|
@kadaliao what does this print out for you?
|
|
So download |
I did what you did and the line Name |
|
After installing numpy, I downloaded To install from source:
|
A workaround which seems to work (at least on my MacBook Pro 2018). If you are using homebrew, replace Mac OS BLAS by openblas for pip install.
|
|
WARNING: Value for scheme.headers does not match. Please report this to pypa/pip#9617 |
That's a warning, and the link it outputs should contain a clear answer to any questions you may have. |
@TheMissingPort That warning is unique to the newly released pip and is intended to warn of upcoming changes that might affect some distributions. It can be ignored. |
@Julian Are you using old New python3.9 has adopt ❯ ll /opt/homebrew/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ensurepip/_bundled
total 4560
-rw-r--r-- 1 xxxxx admin 0 May 3 23:11 __init__.py
drwxr-xr-x 3 xxxxx admin 96 Jun 10 20:57 __pycache__
-rw-r--r-- 1 xxxxx admin 1547644 May 3 23:11 pip-21.1.1-py3-none-any.whl
-rw-r--r-- 1 xxxxx admin 784941 May 3 23:11 setuptools-56.0.0-py3-none-any.whl
|
This issue persists with pipenv (version 2021.5.29) and pip (21.1.2). and this issue does not depend on Apple silicon - x86_64 is affected by this. |
@nfx which part of this issue? I have lost track of where we are here. |
(same here, to me this should be closed at this point) |
Issue persists when using pipenv with homebrew python 3.9 on x86 macOS.
|
I have tested ❯ file `which python3.9`
/usr/local/opt/python@3.9/bin/python3.9: Mach-O 64-bit executable x86_64
❯ python3.9 -m venv venv39
❯ source venv39/bin/activate
❯ pip install numpy
Collecting numpy
Downloading numpy-1.20.3-cp39-cp39-macosx_10_9_x86_64.whl (16.1 MB)
|████████████████████████████████| 16.1 MB 370 kB/s
Installing collected packages: numpy
Successfully installed numpy-1.20.3
WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider upgrading via the '/Users/siyaochen/venv39/bin/python3.9 -m pip install --upgrade pip' command.
❯ arch
i386 |
installing NumPy via pip (21.1.2) in pipenv (version 2021.5.29) on macOS Big Sur with python 3.9.5 from HomeBrew on x86_64 hardware |
It seems you should be downloading the |
What helped me get past this was setting See this post for context. |
In my case I had the same error and because it was a file permission problem I used: sudo chown -R ${USER}:staff "$(brew --prefix)/lib/python3.9/site-packages/numpy" |
I think this should be the real reason. 👍👍👍 |
There are multiple issues mixed in here, and after the numpy
I will close the issue. If you still have problem, please open a new issue, describing which of these problems (or yet another problem) you are seeing and providing a full build/install log. |
This helps other developers run the code more easily. To install dependencies, and run a file called `main.py` for example: ``` python3 -m pip install --user pipenv pipenv install pipenv run python main.py ``` See - https://packaging.python.org/tutorials/managing-dependencies/ - https://docs.python-guide.org/dev/virtualenvs/ Note: on macOS Big Sur there is a bug where pipenv install will take a long time, then fail when installing numpy. [A workaround](numpy/numpy#17784 (comment)) is to set the environment variable `SYSTEM_VERSION_COMPAT=1`.
This worked on Mac M1 Pro as well. Thank you so much. |
I am getting this error when trying to install a numpy wheel package on to my apple m4 silicon machine in termimal...
|
Uh oh!
There was an error while loading. Please reload this page.
Reproducing code example:
Install Pandas with PIP after a clean install of macOS Big Sur and Python3.9 via Homebrew.
These are the only packages actually installed:
Error message:
NumPy/Python version information:
I have also installed NumPy first (numpy 1.19.4) still getting the same error.
I have opened the following issues and in both of them they said that it's a Numpy error: Pandas#37880 and Pip#9138
The text was updated successfully, but these errors were encountered: