Problems running Python programs on PyCharm on new Mac Book Air (m1 / apple silicon )

I've installed PyCharm on my Mac Book Air (m1/apple silicon, latest build of Big Sur) PyCharm (Community Edition 2021.2, Apple Silicon version). When I launch PyCharm and create a new project, just trying to execute the most basic program like the one below refuses to run if I right-click and go to "Run"

value = input("Please enter a string:\n")
print(f'You entered {value}')

If I try to Run this in the console PyCharm reports

Process finished with exit code 137 (interrupted by signal 9: SIGKILL)

Event a simple print("hello world") produces this same error. If I look at interpreter, it's set to /user/bin/python2.7 however the project seems to demand Python 3.10. If I go to PyCharm -> Preferences -> Python Interpreter, at the bottom I see "Python packaging tools not found" and a link to "Install packaging tools". When I attempt to click on this link, I get a dialog box with a stop sign symbol saying "permission denied"

Trying to look up how to grant PyCharm root permissions on a Mac Book led me to a bunch of articles on how to do this on Ubuntu.

 

2 comments
Comment actions Permalink

Hi, please install the latest version of Python from www.python.org, it should already include packaging tools.

Another option I can recommend is using pyenv: https://github.com/pyenv/pyenv

Python supports M1 natively starting from version 3.9.1

0
Comment actions Permalink

Any updates on this? I have tried uninstalling and wiping the program from my machine a few times now. I'm getting the same error when trying to print to the console. 

(Edit: I fixed it by going into preferences and deleting the previous version of the python interpreter and adding the current.)

 

2

Please sign in to leave a comment.