【问题标题】:installing python@3.7 MacBook Air m1 problem安装 python@3.7 MacBook Air m1 问题
【发布时间】:2022-01-15 18:57:20
【问题描述】:

在 MacBook Air m1 2020 上安装 python3.7 时出现以下错误。 我运行以下命令:

brew install python@3.7

抛出以下错误:

python@3.7: The x86_64 architecture is required for this software.
Error: python@3.7: An unsatisfied requirement failed this build.

我的问题是“如何使用 brew 在 MacBook Air m1 上安装 python3.7??

【问题讨论】:

  • 只使用linux :-)
  • @mama 让我扔掉我的 MacBook :)
  • 不!这么多的孩子不得不努力组装它!无论如何,错误的哪一部分不清楚?另外,只是一个建议,搜索错误信息,你可能不是第一个遇到它...
  • @UlrichEckhardt 实际上 m1 处理器是非常新的,在堆栈溢出时没有关于它的问题/答案。所以,我只想收集这个问题下的答案。
  • stackoverflow.com/… -- 你确定吗?

标签: python macos homebrew apple-m1


【解决方案1】:

使用查询 python 3.7 mac m1 进行 Google 搜索会产生 this article

我有 Rosetta2,可以用 brew x86 安装 python 3.7 吗?

答案是肯定的,从安装 brew x86 版本 aka ibrew开始

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

为rc文件添加别名

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

在 M1 上安装 python 3.7 ???

ibrew install python@3.7

现在您可以选择brew 来安装 ARM 应用程序或 ibrew 当您想安装 x86 应用程序时。快乐编码?

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2021-10-07
  • 2021-03-13
  • 2021-05-20
  • 1970-01-01
  • 2021-04-08
  • 2022-08-10
  • 2023-02-20
  • 2021-09-02
相关资源
最近更新 更多