atdinh
atdinh

Reputation: 1175

Build Failure: How to use Pyenv to install Python 3.8.3 on macOS Big Sur version 11.0.1?

I tried using the command pyenv install 3.8.3 to install Python 3.8.3 but got a build failure error pictured below.

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

Build Failure Error

Does anyone know how to make the build successful on macOS Big Sur version 11.0.1?

Upvotes: 3

Views: 5725

Answers (5)

random-forest-cat
random-forest-cat

Reputation: 35984

I am successfully running python 3.8.3 on mac intel (Ventura 13.5)

In order for this to work I had to:

  • use homebrew zlib instead of xcode
  • use non-standard compiler
  • use a patch to support apple specific build issues
brew install gcc@11 

LDFLAGS="-L/usr/local/opt/zlib/lib" CC=$(which gcc-11) pyenv install 3.8.3 --patch < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch)

Upvotes: 1

Leonardo Ramos
Leonardo Ramos

Reputation: 323

In my case, i use path python to install all versions. this command resolve all problems:

pyenv install --patch 3.6.8 <<(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)

In case you need another version, just change 3.6.8 for your version.

Upvotes: 3

Castiel Wong
Castiel Wong

Reputation: 119

Feels like it's Mac issue. Not sure what was actually happened, but it worked after I uninstall the CLT then reinstall.

Below is the steps I have done:

  1. Uninstall current CLT:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
  1. Remember to install "Xcode" from the App Store if not.

  2. Run sudo xcodebuild -license accept then update pyenv in Homebrew should make things work.

Upvotes: 0

If you have brew installed you can use it to install python3.8. Try using:

brew install [email protected]

Also, you can use python3.8 -m virtuanenv to create a virtual environment

Upvotes: -3

anthony sottile
anthony sottile

Reputation: 70175

3.8.3 is far too old to support macos 11

At the time of writing, the current 3.8.x release 3.8.7 has only partial support for big sur (it will build and run, but it lacks some system library support). Full support is planned in python 3.8.8

Upvotes: 4

Related Questions