I recently installed Python 3.10.9 using Brew on my ARM mac (macOS 13.1 Ventura) but when running any of my Python script with PyCharm (native for ARM using a system env with Python 3.10.9 /usr/local/bin/python3), Python crashes and returns one of the 2 error reports, as shown below:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Python [78382]
Path: /Library/Frameworks/Python.framework/Versions/3.10/Resources/Python.app/Contents/MacOS/Python
Identifier: org.python.python
Version: 3.10.9 (3.10.9)
Code Type: ARM-64 (Native)
Parent Process: pycharm [77323]
Responsible: pycharm [77323]
User ID: 501
Date/Time: 2023-01-02 19:22:46.8969 +0100
OS Version: macOS 13.1 (22C65)
Report Version: 12
Anonymous UUID: 90007ABA-5D79-9CD1-C540-78C58ED447AC
Sleep/Wake UUID: C0F3DA32-9A4C-40DA-B838-0C43B7D63AA1
Time Awake Since Boot: 22000 seconds
Time Since Wake: 59 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000000000001e
Exception Codes: 0x0000000000000001, 0x000000000000001e
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [78382]
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Python [86657]
Path: /Library/Frameworks/Python.framework/Versions/3.10/Resources/Python.app/Contents/MacOS/Python
Identifier: org.python.python
Version: 3.10.9 (3.10.9)
Code Type: ARM-64 (Native)
Parent Process: pycharm [84646]
Responsible: pycharm [84646]
User ID: 501
Date/Time: 2023-01-02 22:59:59.8243 +0100
OS Version: macOS 13.1 (22C65)
Report Version: 12
Anonymous UUID: 90007ABA-5D79-9CD1-C540-78C58ED447AC
Sleep/Wake UUID: C7252D6D-6A22-475B-BEB4-81B2B1C35C73
Time Awake Since Boot: 30000 seconds
Time Since Wake: 1526 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001a3b8e810
Termination Reason: Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process: exc handler [86657]
I saw that sometimes Python's installation using Brew can sometimes results in weird issues, therefore I tried to uninstall and reinstall using Python installer from Python.org. Didn't change a thing.
Also uninstall/reinstall openssl, tried with version 1.0.2t, 1.1.1s and 3.0.7. Tried this solution, which worked on my intel mac. Yet, this failed to solve the matter here.
I then tried to manually link openssl. Didn't solve my issue.
And at last, I tried using lido
to combine binaries, both the intel and ARM versions, but this solution didn't work, both command cp -r openssl-1.1.1s openssl-1.1.1s-arm64
and cp -r openssl-1.1.1s openssl-1.1.1s-x86_x64
returned cp: openssl-1.1.1s: No such file or directory
, even when openssl@1.1 (version 1.1.1s) is installed using Brew.
So far none of those solutions worked for me.