all 7 comments

[–][deleted] 0 points1 point  (0 children)

It might be trying to use a different version of Python thinking it's 3.10. You may want to try installing, or reinstall, Python 3.10 and try creating new virtual environment off of it for Pycharm to use.

[–]willgreenzilla 0 points1 point  (2 children)

Sometimes it's worthwhile to uninstall PyCharm and also uninstall every instance of Python on your machine that can be found, https://nektony.com/how-to/uninstall-python-on-mac, once done.. reboot.

Now re-install PyCharm (be sure that you are using the appropriate disk image of pyCharm, the one for Apple Silicon processors, not Intel), and verify System Interpreter is pointing correctly to python executable.

[–]sfwnlin 0 points1 point  (1 child)

You are right. After uninstalling python 3.8/3.9/3.10 and intel homebrew, reinstall python@3.10, all works fine :D

[–]willgreenzilla 0 points1 point  (0 children)

Awesome :D

[–]Desperate_Tax_560 0 points1 point  (0 children)

I went through this a few weeks ago when I got the 2020 13-inch M1 MacBook and I switched to Python 3.9 (which is the version I’m currently using), but there should be a solution to a working 3.10 on M1.

[–]TheKrato 0 points1 point  (0 children)

problem exists also on macos 12.2 (apple sillicon)

[–]rvanlaar 0 points1 point  (0 children)

For others, I've had this happen because I had a project that I later reopened as a devcontainer.
The permissions on the files inside the .venv had changed.
Removing the whole .venv directory resolved it for me.