4

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
wjandrea
  • 28,235
  • 9
  • 60
  • 81
Harman Kibue
  • 86
  • 1
  • 5

3 Answers3

4

Try this, Go to Application folder -> Right click on Terminal App -> Get Info

Tick Open with Rosetta option. build the project now.

Rahul R
  • 184
  • 1
  • 7
0

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.

0

Installing the Intel .dmg version of PyCharm solved this issue for me, after trying lots of ways all through the day

Skyouth
  • 11
  • 3