Install python3.6.8 failed in MacOS Sonoma useing pyenv

100 views Asked by At

I'm trying to install python3.6.8 onto a Mac using pyenv. However, I'm getting the error:

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

Inspect or clean up the working tree at /var/folders/12/9cwdctlj7hs4g9w160xyg6rr0000gn/T/python-build.20240301183819.4919
Results logged to /var/folders/12/9cwdctlj7hs4g9w160xyg6rr0000gn/T/python-build.20240301183819.4919.log

Last 10 log lines:
checking for long double support... yes
checking size of long double... 8
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
configure: error: Unexpected output of 'arch' on OSX
make: *** No targets specified and no makefile found.  Stop.

When I install with brew, I get this error: No available formula with the name "[email protected]". Did you mean [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] or python-yq?

1

There are 1 answers

0
Anurag Singh On

Try this to install e.g. Python 3.8.5 on macOS Sonoma using pyenv, on an Apple ARM chip, worked fine for me. (you might be able to find a similar patch for Python 3.6.8)

brew install openssl readline sqlite3 xz zlib

Next, you can try installing Python 3.8.5 using a patch provided by Homebrew. This patch is specifically designed to address compatibility issues with the Apple ARM chips:

pyenv install --patch 3.8.5 <<(curl -sSL https://raw.githubusercontent.com/Homebrew/formula-patches/113aa84/python/3.8.3.patch\?full_index\=1)