简体   繁体   English

无法在带有 M1 芯片的 MacOS Big Sur 上安装 pyenv 3.8.5?

[英]Can't install pyenv 3.8.5 on MacOS Big Sur with M1 chip?

I am trying to run pyenv install 3.8.5 but keep getting the error below:我正在尝试运行 pyenv install 3.8.5 但不断收到以下错误:

python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.8.5.tar.xz...
-> https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tar.xz
Installing Python-3.8.5...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 11.5.1 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/61/8hkv2j8j6x7d7ldfq1d201b80000gp/T/python-build.20211009182855.32315
Results logged to /var/folders/61/8hkv2j8j6x7d7ldfq1d201b80000gp/T/python-build.20211009182855.32315.log

Last 10 log lines:
checking size of _Bool... 1
checking size of off_t... 8
checking whether to enable large file support... no
checking size of time_t... 8
checking for pthread_t... yes
checking size of pthread_t... 8
checking size of pthread_key_t... 8
checking whether pthread_key_t is compatible with int... no
configure: error: Unexpected output of 'arch' on OSX
make: *** No targets specified and no makefile found.  Stop.

Trying to install via homebrew.尝试通过自制软件安装。 The weird thing is that I can install pyenv 3.9.6.奇怪的是我可以安装 pyenv 3.9.6。 I think it has something to do with that version not being compatible with the new silicon M1 chip.我认为这与该版本与新的硅 M1 芯片不兼容有关。 I've tried Problems installing python 3.6 with pyenv on Mac OS Big Sur and Issues Installing Python 3.x via Pyenv but nothing is working.我已经尝试过在 Mac OS Big Sur 上使用 pyenv 安装 python 3.6 时出现问题,以及通过 Pyenv 安装 Python 3.x 时出现问题,但没有任何效果。 Thanks in advance!!提前致谢!!

https://www.python.org/downloads/release/python-391/ https://www.python.org/downloads/release/python-391/

3.9.1 is the first version of Python to support macOS 11 Big Sur. 3.9.1 是第一个支持 macOS 11 Big Sur 的 Python 版本。

https://www.python.org/downloads/release/python-3810/ https://www.python.org/downloads/release/python-3810/

Python 3.8.10蟒蛇 3.8.10

... But there's a bunch of important updates here regardless, the biggest being Big Sur and Apple Silicon build support. ...但无论如何这里有一堆重要的更新,最大的是 Big Sur 和 Apple Silicon 构建支持。

You cannot install 3.8.5, unfortunately.不幸的是,您无法安装 3.8.5。

I solved my issue of installing 3.7.6 using pyenv on macbook m1 using this solution.我使用此解决方案解决了在 macbook m1 上使用 pyenv 安装 3.7.6 的问题。 This also shows how to create a patch file that should help install other python versions.这也显示了如何创建一个应该有助于安装其他 python 版本的补丁文件。 hope this helps.希望这可以帮助。

Error installing python 3.7.6 using pyenv on new macbook pro M1 in OS 12.3+ 在 OS 12.3+ 的新 macbook pro M1 上使用 pyenv 安装 python 3.7.6 时出错

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM