-
Notifications
You must be signed in to change notification settings - Fork 181
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
pip install is not working on Apple M1 silicone chip #105
Comments
By looking at your log it seems the error is raised when trying to build numpy. You can see this in the log:
As you can see pip install specifies You may open an issue at scipy, but a short google search seems to show they are aware of the problems. That being said, this SO thread seems to have solutions that enable people to build numpy locally on Apple M1, which is where the process failed for you. If you can build numpy your problem may be resolved. |
@YairMZ thank you so much for the detailed comment! I am not sure I completely understood you. scipy I have managed to installed using homebrew and then manually copying the folder from the homebrew's packages directory (which was something like can you please elaborate how exactly do I use the above in order to get CommPy (or any other scikit module that does not exist on homebrew)? |
@Yarden92 You're welcome. When you install packages via pip, basically there are two options for installing. The distributor of the package distributes the source code for the package, and sometimes he distributes also compiled binaries called wheels. These wheels are helpful as they allow faster install (no need to build it yourself), and they're especially useful for complicated packages such as numpy / scipy for which the build process is complex, as you encountered. The problem with wheels is that since they ship compiled code and not source, they are architecture dependent. Apparently, for M1 macs, wheel support is still lacking. Now, I see that you already have scipy and numpy, but for some reason the installation process tries to build other versions of these packages. I'm not sure if it is a result of the CommPy build process or of scipy, but from the log it seems the issue is with scipy. None the less, it may be required for instance for compatibility reasons. It seems your version of numpy is newer and there may be problems with backward compatability. To make a long story short, the installation failed on trying to build scipy. When you installed it via homebrew, you used compiled code and didn't build it on your machine. To build it, you may be lacking libraries, compilers or both. The link I shared earlier, discusses how people were able to build the libraries and not just install them. Again' I'm not sure why this is even needed and why wheels aren't used. If you want to check, I would start with a clean venv, and try to pip install the earlier version of numpy which is being built while installing CommPy (the version appears in the log you sent). Then after this is succsseful, try intalling CommPy in this venv. |
CommPy does not specify any version for Numpy/Scipy. It accepts newest version of both libraries (Cf. |
I'll just raise it here as well since nobody initiated any speak for that.
same as scipy, scikit-learn etc, this one as well is not installable on Apple's silicone M1 Chips.
with scipy I managed to install it via homebrew and then manually copy the folder to my venv, but this one is not listed on the brew packages.
here's what happen when I run the command:
pip install scikit-commpy
(full error i in the attached log file)
log.txt
any solution / workaround?
The text was updated successfully, but these errors were encountered: