Mac M2 PyQt5 "(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))"

310 views Asked by At

I am using MacBook Pro with M2 chip. I am trying to use PyQt5=5.15.9 in a miniforge virtual environment, python==3.8.17 . I have the following packages in the environment:

cycler==0.11.0
fonttools==4.42.1
kiwisolver==1.4.5
matplotlib==3.5.1
numpy==1.22.1
packaging==23.1
pandas==1.3.5
Pillow==10.0.0
psutil==5.8.0
pyparsing==3.1.1
PyQt5==5.15.9
PyQt5-sip==12.12.2
python-dateutil==2.8.2
pytz==2023.3.post1
scipy==1.7.3
six==1.16.0

But when I run my program, it shows:

dlopen(/Users/zhouromee/miniforge3/envs/FD_benchmarking2/lib/python3.8/site-packages/PyQt5/QtCore.abi3.so, 0x0002): tried: '/Users/zhouromee/miniforge3/envs/FD_benchmarking2/lib/python3.8/site-packages/PyQt5/QtCore.abi3.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/Users/zhouromee/miniforge3/envs/FD_Benchmarking2/lib/python3.8/site-packages/PyQt5/QtCore.abi3.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

I have tried adding --no-binary with pip install as many solution suggests, but nothing works. Can anyone help me please? I don't want to mess up with my laptop so I kinda need a solution that works in a virtual environment. Thanks a lot!

0

There are 0 answers