Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wrong architecture issue on virtual environment Apple M1 Chip

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
like image 496
Harman Kibue Avatar asked Oct 28 '25 08:10

Harman Kibue


1 Answers

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

Tick Open with Rosetta option. build the project now.

like image 77
Rahul R Avatar answered Oct 30 '25 03:10

Rahul R



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!