-
Notifications
You must be signed in to change notification settings - Fork 346
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
Cannot Install on Apple M1 #418
Comments
I think if we bump the |
Edit: my original comment below installs
The same thing happens when installing with
I've tried Python versions 3.8.13, 3.9.12, and 3.10.4. Upgrading pip and uninstalling and reinstalling numpy version 1.22.4 did not resolve the problem. Original comment: I have the same problem when trying to install v0.5.2 on an M1 Mac. A workaround is to install from the repository:
This commit removed the numpy<=1.19 requirement, but it hasn't been released in an updated version, so I don't think it's on PyPI yet. |
Installing from the GitHub repository with the below command also leads to importing errors on my older, Intel Mac.
I believe the problem is that numpy-1.23.2 is installed as the build dependency, but numpy-1.22.4 is installed as the runtime dependency. By this, I mean that numpy-1.23.2 is used in
but then numpy-1.22.4 is installed in the user’s environment, so that when the user is running Python and importing tslearn, they are using numpy-1.22.4. I believe this is the source of the error noted above: “RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf”
I was able to get things working by updating
However, I’m not sure this is the best fix since it would probably need to be updated again once numba supports numpy 1.23. Another fix, which is suggested in this pip issue is to use “oldest-supported-numpy” in
This works on both my Intel and M1 MacBooks. |
@rtavenar Would you be receptive to a PR that makes the above changes to |
Doesn't seem like a complicated fix. Could someone please explain the holdup and if I could help in any way to speed things up? |
Describe the bug
I cannot install
tslearn
on Apple Silicon M1.It's trying to gather
numpy >= 1.19.0
which does not yet have automatic support for M1. But as of version 1.20 they include automatic support for M1 I believe.To Reproduce
Poetry install with tslearn as a dependency
Expected behavior
Successful install
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: