Search code examples
djangomacosapple-m1

MAC M1 Chip Python Architecture Error (have 'x86_64', need 'arm64e')


I am having trouble running django on my M1 Mac. When ever i try to run server or make migrations i get an (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e') error.

My terminal is being open with Rosetta and I am using VSCode ide.


Solution

  • So I ran pipenv install psycopg2 and then tried python3 manage.py runserver again and It compiled without the error.