Install Python 3.8.6 on macOS Big Sur using pyenv

problem

When running pyenv install 3.8.6 in the above environment, the build fails as shown below

$


..
BUILD FAILED (OS X 11.0 using python-build 20180424)
..

solution

Step1: Command line tool settings

  1. Open Xcode-beta.app
  2. Preference > Locations
  3. Change Command Line Tools to the desired version image.png

Step2: Installation

Do the following in the shell

$


LDFLAGS="-L$(xcrun --show-sdk-path)/usr/lib" pyenv install 3.8.6

Confirmation

$


pyenv versions
* system (set by /usr/local/var/pyenv/version)
  3.8.6

Set globally, reload shell, check Python version

pyenv global 3.8.6
zsh -l
python --version
Python 3.8.6

It became 3.8.6 safely


Source: https://github.com/pyenv/pyenv/issues/1643 https://medium.com/@koji_kanao/install-python-3-8-0-via-pyenv-on-bigsur-b4246987a548

Recommended Posts

Install Python 3.8.6 on macOS Big Sur using pyenv
Install Python on CentOS using Pyenv
Install Python on CentOS using pyenv
Get started with Python on macOS Big Sur
Build a Python development environment using pyenv on MacOS
Introducing Python using pyenv on Ubuntu 20.04
Notes on installing Python using PyEnv
I couldn't install numpy using poetry on macOS Big Sur, so I forcibly avoided it
Install python library on Lambda using [/ tmp]
Install Python less than 3.5.3 on macOS Catalina
Install pyenv and Python 3.6.8 on Ubuntu 18.04 LTS
Install pyenv on mac
Install Python on Pidora.
Install Scrapy on python3
Install Python on Mac
Install Python 3 on Mac
Install Python3.4 on CentOS 6.6
Install python (pyenv, pyenv-virtualenv)
Install python on windows
Run pip install on MacOS Python 3.7 or later
Install Python 2.7.3 on CentOS 5.4
Install python with pyenv
Install Python 3.3 on Ubuntu 12.04
Install Python 3 on MacOS Catalina (with Homebrew only)
Install Python 3.4 on Mac
Install pyenv on OSX
Install Python 3.6 on Docker
Install Python and libraries for Python on MacOS Catalina
Build a Python environment on your Mac using pyenv
Install pyenv on Raspberry Pi and version control Python
Install Python environment on local PC (pyenv, venv on Mac)
Minimum memo when using Python on Mac (pyenv edition)
[CentOS7] Install anaconda using pyenv
Install watchdog on Windows + Python 3.3
Install pygame on python3.4 on mac
Install Python 3.8 on CentOS 7 (SCL)
Made python available on macOS
Change python version using pyenv
Install pandas 0.14 on python3.4 [on Mac]
Install OpenCV on Ubuntu + python
Python --Install MySQLDB on EC2
Install pyenv from Homebrew, install Python from pyenv
Install Python 3.8 on CentOS 8 (AppStream)
Broadcast on LINE using python
[Python] [Chainer] [Windows] Install Chainer on Windows
IP spoof using tor on macOS and check with python
Install pyenv on MacBook Air and switch python to use
List of libraries to install when installing Python using Pyenv
Until building a Python development environment using pyenv on Ubuntu 20.04
How to install python using anaconda
Install Python Pillow on Amazon Linux
Install Python 3.8 on Ubuntu 18.04 (OS standard)
Install Python3 on Sakura server (FreeBSD)
Install Python 3.8 on Ubuntu 20.04 (OS standard)
Notes on using MeCab from Python
Install xgboost (python version) on Windows
Preparing python using vscode on ubuntu
Install Python on Windows + pip + virtualenv
Install Pytorch on Blender 2.90 python on Windows
How to install graph-tool on macOS
Install Python 3.7 Anaconda on MAC, but Python 2