I am using conda a lot and for some packages and environments I need x86_64 architecture. I did this by duplicating my Terminal.app and starting one duplicate with Rosetta (as described here: https://towardsdatascience.com/how-to-install-miniconda-x86-64-apple-m1-side-by-side-on-mac-book-m1-a476936bfaf0). Unfortunately, I can't duplicate my Terminal.app anymore since macOS 13. Does anyone already have a solution for this?
2 Answers
I have the same problem with react-native, nor even with sudo can duplicate it, but you can use the arch
command for that:
arch -arch_name binary args ...
# example with react-native:
arch -x86_64 npx react-native run-ios --simulator "iPhone 14"
See man arch
for more details
-
2can I use this
arch
the restart the terminal with it like executingarch -x86_64 source ~/.zshrc
? Oct 26, 2022 at 10:50 -
arch -x86_64 zsh
would set it. So if you exec justarch
it give you the current architecture running so, beforearch -x86_64 zsh
would be arm64 and after will be i386– madwyattOct 28, 2022 at 15:58 -
Thanks, this really helps. Would be great, if there would be a solution to create a duplicate still. Or maybe a shortcut, that starts with Rosetta :). Oct 29, 2022 at 8:49
-
I suspect that disabling SIP would allow you to duplicate it. But I also suspect that Software Update will undo it. I made improvements to my "Press and Hold" which were wiped out by the next Software Update. But maybe with SIP disabled, you could make a copy in a location like ~/Desktop that would not be removed by Software Update. I have a persistent copy of my PressAndHold changes but MacOS will only use the standard location.– WGroleauMar 6 at 19:30
I found the answer on the Apple Developer Forum:
% env /usr/bin/arch -arm64 /bin/zsh --login
% arch
arm64
% env /usr/bin/arch -x86_64 /bin/zsh --login
% arch
x86_64
I tried this and it’s working as expected.