I'm trying to run Python 3 on the new M1 chip MacBook. I tried installing python3 both via the official Python website () and also via brew install python3. Both of the installations succeeded, however when I try running the command python3 in Terminal I get this error:
zsh: killed python3Does anyone know what's going on? I couldn't find anything online and I think my installation should be fine. I did have to change my ~/.zshrc file for a class, but I'm not sure if that's the issue?
23 Answers
I faced this same issue in the M1 Macbook pro and fixed it by doing the following
Open ~/.zshrc file (Create a new one if not present already)
Add the following line
alias python3="/usr/bin/python3"Make sure you are able to access python3 from the above location by running
/usr/bin/python3This should invoke Python3 for you or check for the correct path in /usr/bin and update the above line accordingly. You can do the same for other versions of Python also accordingly.
Try reinstalling python and all dependencies using homebrew!
brew reinstall $(brew deps python3) python3 I got a same error. Then I disabled MacOS System Integrity Protection(SIP), python3 runs correctly.