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

Viewed 4877

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?

4 Answers

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

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.

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

brew install python@3.8

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

Related