is it possible to run the terminal through rosetta for arm?

Answered

I have mac with arm, and the arm version of vs code. However, many of the packages don't work native. I have gotten everything up and running running the mac terminal through rosetta, but don't see an option to run the vs code terminal through rosetta on it's own. Is that possible?

11 comments
Comment actions Permalink

Hi Jason,

This is the PyCharm forum, not VS Code.
Please contact the VS Code team using one of the options mentioned in their documentation https://code.visualstudio.com/docs/supporting/faq#_technical-support

0
Comment actions Permalink

Sergey Karpov

Sorry about that.  I've been trying to get either to work, and misspoke.   Is it possible for PC?

0
Comment actions Permalink

You can configure terminal shell in Preferences | Tools | Terminal like you do normally to run it in Rosetta.

1
Comment actions Permalink

Who ever lands here via Google, set the "shell path" under preferences - tools - terminal:

env /usr/bin/arch -x86_64 /bin/zsh --login
18
Comment actions Permalink

Serge, can you confirm how you do this through Preferences | Tools | Terminal? I’m not seeing an option for Rosetta / ARM.

0
Comment actions Permalink

redaxmedia solution worked perfectly. Could you help me understand what the lines are doing? How does the env command work?

0
Comment actions Permalink

The solution of redaxmedia didn't work for me, but creating a Shell Script Run Configuration using a Script text did the job for me:

env /usr/bin/arch -x86_64 /bin/zsh -c "python3 -m my_package"

2
Comment actions Permalink

Edit - Changing the terminal also applied for the test runner 
Thanks redaxmedia, I can now start the terminal with arch==i386. How can I do the same when using PyCharm run command (for example to run tests)?

1
Comment actions Permalink

I used redaxmedia solution, the terminal works fine, but PyChram is not enabling my Python virtual environment.

which python
/Users/my_user/.pyenv/shims/python

instead of: 

which python
/Users/my_user/workspace/package_name/venv/bin/python

any ideas on how to fix it?

Thanks 

4
Comment actions Permalink

Slanton I am running

source ./venv/bin/activate
0
Comment actions Permalink

Change shell path to "env /usr/bin/arch -x86_64 /bin/zsh" seems to solves the issue (allowing using zsh and activating the virtual env)

0

Please sign in to leave a comment.