简体   繁体   中英

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:

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. I think it has something to do with that version not being compatible with the new silicon M1 chip. 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. Thanks in advance!!

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

3.9.1 is the first version of Python to support macOS 11 Big Sur.

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

Python 3.8.10

... But there's a bunch of important updates here regardless, the biggest being Big Sur and Apple Silicon build support.

You cannot install 3.8.5, unfortunately.

I solved my issue of installing 3.7.6 using pyenv on macbook m1 using this solution. This also shows how to create a patch file that should help install other python versions. hope this helps.

Error installing python 3.7.6 using pyenv on new macbook pro M1 in OS 12.3+

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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