-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Packaging bug causes an x86_64 regex to be installed on an Apple Silicon (M1) device #2524
Comments
I've stated this on multiple other issues, black supports and works in aarch64 / M1 environments. Black is native python, but here you have installed a non aarch64 mach-o compiled regex .so. Regex is a C dependency, so is compiled and you've somehow got the wrong architecture compiled binary. The error clearly states that via "but wrong architecture". How did you get to this? Is this an issue with homebrew? Did you manually copy things from a non M1 Mac? I think we need to workout how you ended up here to see if we can fix a packaging bug somewhere. Get an aarch64 build of regex (https://pypi.org/project/regex/) into your python environment and you'll work. Latest pip will do this correctly. Maybe use a venv: (
|
The main question here is: How did you install black? What does the installation environment look like? This issue seems to have occured then, and you're seeing a crash when you're trying to run a thing that wasn't built properly. |
It seems to me that the issue is that regex has uploaded an Using |
Quite an easy repro wrt versions. On an M1 machine running Monterey-beta (not that Monterey is the issue):
The above fix, pinning regex to
|
For anyone using the black pre-commit hook, here's a workaround
|
Related issue: Trying to run
|
this should be fixed now with a newly released version of https://bitbucket.org/mrabarnett/mrab-regex/commits/26d37df1c3d0faa2a40098eb45b0300cfa0e8aa6
|
The error I'm reporting is a bit different. The initial error was because the M1 wheel was missing. The error I'm reporting is |
Please report it in a separate issue then. |
i understand. i had the same issue. the unsigned library error is fixed in the latest version of regex, which was released just last night. i tested on my m1 mbp and it worked as expected. |
Can confirm my initial report is fixed. |
MacBook Air M1, MacOS Monterey 12.0.1, Python 3.9.7
Unfortunately, pining to version regex == 2021.9.30 doesn't help |
I installed
|
try with |
Hello everyone!
We've been made aware that the M1 wheel for regex 2021.10.8 seems to be non-functional. Pinning regex to 2021.9.30 should work for the time being. There's also a very recent release of regex that may fix the issue, but it hasn't been confirmed.
~ originally @pradyunsg, reposted by @ichard26 (9AM EST, 21 October, 2021)
Describe the bug
black
panics on Apple SiliconTo Reproduce
$ black --version
Expected behavior
See version
Environment (please complete the following information):
OS:
Python:
The text was updated successfully, but these errors were encountered: