Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

installing [email protected] MacBook Air m1 problem

I am gettin following error while installing python3.7 on MacBook air m1 2020. I run the following command:

brew install [email protected]

The following error is thrown:

[email protected]: The x86_64 architecture is required for this software.
Error: [email protected]: An unsatisfied requirement failed this build.

My question is that "how can I install python3.7 on MacBook Air m1 using brew??

like image 725
Celik Avatar asked Sep 12 '25 15:09

Celik


1 Answers

Based on this article, you may install Rosetta 2 to be able to use brew x86, and then use it to install python 3.7.

To install Rosetta 2:

softwareupdate --install-rosetta

Then, install brew x86 version:

arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Optionally, add an alias to the ~/.zshrc (or similar) file:

alias ibrew="arch -x86_64 /usr/local/bin/brew"

Now you can choose between brew when you want to install an ARM app or ibrew when you want to install x86 app.

Finally, to install x86 python 3.7 on M1:

ibrew install [email protected]
like image 165
fn control option Avatar answered Sep 15 '25 07:09

fn control option