(One of the solutions) when pyenv install on macOS causes BUILD FAILED and Python installation fails.

Solution

When I installed Python using pyenv, it resulted in BUILD FAILED and the installation failed. The cause was binutils. I uninstalled binutils and then re-run it and it worked.

$ brew uninstall binutils
$ pyenv install <PYTHON_VERSION>
$ brew install binutils

I wasn't sure why the installation would fail if binutils was installed.

If you look it up in "pyenv install build failed macos", you will find many articles. The solutions were all different. In my case, I solved it by just uninstalling binutils, so I will share it as one of the solutions. I'm glad if you can use it as a reference.

environment

environment version
macOS 10.15.6
pyenv 1.2.20-3-g58c776a1
Python (What was installed by this procedure) 3.8.5
Other system information Brewfile.lock.json

Recommended Posts

(One of the solutions) when pyenv install on macOS causes BUILD FAILED and Python installation fails.
When pyenv install BUILD FAILED
Causes and solutions when python sam build fails in a newly created Cloud9 environment
[Python: UnicodeDecodeError] One of the error solutions when reading CSV
Installation of psutil fails on MacOS Cataline
Install pyenv and Python 3.6.8 on Ubuntu 18.04 LTS
Install Python 3.8.6 on macOS Big Sur using pyenv
Install Python and libraries for Python on MacOS Catalina
Install Python3 on Mac and build environment [Definitive Edition]
Install the latest stable Python with pyenv (both 2 and 3)
Build a Python development environment using pyenv on MacOS
Install pyenv on Raspberry Pi and version control Python
Install django on python + anaconda and start the server
Install pyenv on MacBook Air and switch python to use
[Tips] Problems and solutions in the development of python + kivy
Initial setting of Mac ~ Python (pyenv) installation is the fastest
List of libraries to install when installing Python using Pyenv
Source installation and installation of Python
How to deal with python installation error in pyenv (BUILD FAILED)
Quickly install OpenCV 2.4 (+ python) on OS X and try the sample
Install and manage multiple environments of the same distribution on WSL
Build Python environment on Ubuntu (when pip is not the default)
I'm not afraid of errors anymore! Python errors and their causes / solutions
The story of Python and the story of NaN
Installation of SciPy and matplotlib (Python)
Build and install OpenCV on Windows
How to deal with the problem that build fails when CI / CD of Python Function with AWS Amplify
Install Python on CentOS using Pyenv
If Python 3.5.0 installation fails on Mac
I couldn't install pypy3.6-7.3.1 on macOS + pyenv, but I could install pypy3.6-7.3.0. I felt the wind of pypy by the Monte Carlo method.
Install Python on CentOS using pyenv
Try to build python and anaconda environment on Mac (by pyenv, conda)
Installation of Visual studio code and installation of python
Build Python3 and OpenCV environment on Ubuntu 18.04
Build a python environment on MacOS (Catallina)
Notes on building Python and pyenv on Mac
Install Python less than 3.5.3 on macOS Catalina
Install pyenv and rbenv on CentOS system-wide
I want to use Python in the environment of pyenv + pipenv on Windows 10
I installed Pygame with Python 3.5.1 in the environment of pyenv on OS X
Install the Python API of the autonomous driving simulator LGSVL and execute the sample program
Build a python environment to learn the theory and implementation of deep learning
Examples and solutions that the Python version specified in pyenv does not run
Use python on Raspberry Pi 3 and turn on the LED when it gets dark!