相关疑难解决方法(0)

在带有 M1 芯片(基于 ARM 的 Apple Silicon)的 Mac 上安装早期版本的 Python(3.8 之前)失败

我有带 Apple M1 芯片的 Macbook,我的项目必须在其中使用 Python 3.6.5。它预装了 Python 2.7.16 和 3.8.2。我曾经brew安装 Python,默认情况下安装 3.9.1。

因此,我尝试使用自制程序公式来安装 3.6.5,但出现以下错误:

checking for pthread_t... yes
checking size of pthread_t... 8
configure: error: Unexpected output of 'arch' on OSX

Do not report this issue to Homebrew/brew or Homebrew/core!
Run Code Online (Sandbox Code Playgroud)

我试过pyenv install 3.6.5,但它失败了,并出现与上述类似的错误。方法说明这里通过ePi272314与git的承诺失败,因为它是在自制不再支持安装Python。

当我尝试使用Rosetta 2运行终端 并安装 python 3.6.5 时,使用上述方法,我得到以下信息或其他一些编译错误:

Error: Cannot install in Homebrew under Rosetta 2 in ARM default prefix (/opt/homebrew)!
Run Code Online (Sandbox Code Playgroud)

最后,我下载了 Python 3.6.5 的 dmg …

python macos python-3.x apple-silicon

10
推荐指数
2
解决办法
8639
查看次数

在 Apple Silicon M1 Mac 上安装加密

帮助!我正在尝试在我的 m1 上安装加密。我知道我可以在 rosetta 模式下运行终端,但我想知道是否有办法不这样做。

输出:

    ERROR: Command errored out with exit status 1:
     command: /opt/homebrew/opt/python@3.9/bin/python3.9 /opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/tmpl4sga84k
         cwd: /private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-install-jko4b562/cryptography_7b1bbc9ece2f481a8e8e9ea03b1a0030
    Complete output (55 lines):
    
        =============================DEBUG ASSISTANCE=============================
        If you are seeing a compilation error please try the following steps to
        successfully install cryptography:
        1) Upgrade to the latest pip and try again. This will fix errors for most
           users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
        2) Read https://cryptography.io/en/latest/installation.html for specific
           instructions for your platform.
        3) Check our frequently asked questions for more information:
           https://cryptography.io/en/latest/faq.html …
Run Code Online (Sandbox Code Playgroud)

python-cryptography apple-silicon apple-m1

8
推荐指数
4
解决办法
3428
查看次数