How can I setup PyCharm to run the x86 version of python and/or the proper architecture (X86) through the console?

I am trying to run PyCharm w/ Rosetta on a M1 macbook. I have a venv that runs a X86 version of python. I have added env /usr/bin/arch -x86_64 /bin/zsh --login to Tools->Terminal->shell path".

When I run python in PyCharm terminal and check the platform with python -c "import platform; print(platform.machine())" it shows as X86_64.

However, when I attempt to run my code through the PyCharm console (e.g., by hitting the run button), the same platform commands output arm64.

How can I setup PyCharm to run the x86 version of python and/or the proper architecture (X86) through the console?

0

Hi Sschoepp, would it help to run

python3 -c “import sys; print(sys.executable)”

in terminal and add new system interpreter with the output from the above command?

0

Hi Mikhail Tarabrikov,

The output of the command is just my venv and when I add it, console still is based on arm64 while terminal is on X86_64.

0

Hi Mikhail Tarabrikov,

I actually already tried that too. It works to some extent, but there is a long list of warnings which weren't there before I upgraded PyCharm (see below). Also, it doesn't work when I try to debug my code. It seems as though the debugger is using a different version of python??

FYI: This problem arose first after I updated PyCharm. I have also attempted to downgrade to the old PyCharm, which didn't work. Then I deleted PyCharm files and did a clean uninstall (as published on the PyCharm page) and then reinstalled PyCharm, and that didn't solve the problem either.

0

Sschoepp , I see, thank you. The only option is then to install x86 version of PyCharm: https://www.jetbrains.com/pycharm/download/other.html

0

请先登录再写评论。