- https://stackoverflow.com/questions/66081709/whats-the-proposed-way-to-switch-to-native-homebrew-on-m1-macbooks
- https://stackoverflow.com/questions/65901162/how-can-i-run-pyqt5-on-my-mac-with-m1chip
iarch_name="$(uname -m)"
if [ "${arch_name}" = "x86_64" ]; then
if [ "$(sysctl -in sysctl.proc_translated)" = "1" ]; then
echo "Running on Rosetta 2"
else
echo "Running on native Intel"
fi
eval "$(arch -x86_64 /usr/local/Homebrew/bin/brew shellenv)"
alias ibrew='arch -x86_64 /usr/local/Homebrew/bin/brew'
elif [ "${arch_name}" = "arm64" ]; then
echo "Running on ARM"
eval "$(/opt/homebrew/bin/brew shellenv)"
else
echo "Unknown architecture: ${arch_name}"
fi
After enabling Rosetta 2 to your terminal, ibrew command can be used to install dependecies like PyQT@5 etc... should be good to go...
python3 -m pip install virtualenv
python3 -m virtualenv -p python3 env
source env/bin/activate
(env) pip install --upgrade pip
(env) pip install -r requirements.txt