Reputation: 96
I have been trying to run my django project on my new macbook Apple M1 Chip machine but only to encounter the error below. I have tried to ensure that arch command returns i386 on both pycharm and system terminal but still not working.
ImportError: dlopen(/Users/harmankibue/.virtualenvs/wwsb_env/lib/python3.9/site-packages/srsly/ujson/ujson.cpython-39-darwin.so, 2): no suitable image found. Did find:
/Users/harmankibue/.virtualenvs/wwsb_env/lib/python3.9/site-packages/srsly/ujson/ujson.cpython-39-darwin.so: mach-o, but wrong architecture
/Users/harmankibue/.virtualenvs/wwsb_env/lib/python3.9/site-packages/srsly/ujson/ujson.cpython-39-darwin.so: mach-o, but wrong architecture
Upvotes: 4
Views: 6303
Reputation: 11
Installing the Intel .dmg version of PyCharm solved this issue for me, after trying lots of ways all through the day
Upvotes: 0
Reputation: 1
I had Python 3.8.10 in my mac OS and was facing this same error after installing numpy version 1.21.x.
Reinstalling numpy with a lower version of 1.19.2 worked for me and I stopped seeing such errors.
Upvotes: 0
Reputation: 184
Try this, Go to Application folder -> Right click on Terminal App -> Get Info
Tick Open with Rosetta option. build the project now.
Upvotes: 4