Install Python 3.8 on Mac using pyenv
In this tutorial, I will show you how to install Python 3.8 on Mac using pyenv.
Python 3.8.0 is the newest major release of the Python programming language, and it contains many new features and optimizations.
Read Also: How to install Python 3.7.0 on Mac
1. Install Pyenv using brew
In the first step, we will install pyenv using brew.
brew install pyenv
or
brew upgrade pyenv #If pyenv is already installed
and add pyenv path into your profile. I am zsh so I will add the PATH into .zshrc. If you are using bash add the following to .bashrc or .profile or .bash_profile.
echo 'export PATH="$(pyenv root)/shims:$PATH"' >> ~/.zshrc
source ~/.zshrc
Consider reading: How to install Python 3.7 on Raspberry PI
2. Install Python 3.8 on Mac
Now we will just use pyenv to install python. pyenv makes it easy to install and switch Python versions.
pyenv install --list | grep 3.8
3.8.0
pyenv install 3.8.0
python-build: use [email protected] from homebrew
python-build: use readline from homebrew
Downloading Python-3.8.0.tar.xz...
-> https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz
Installing Python-3.8.0...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.8.0 to /Users/chetan/.pyenv/versions/3.8.0
and it installed successfully.
3. Check the list of installed Python
We can manage and switch Python versions using pyenv. For complete tutorial follow this link.
$ pyenv versions
system
* 3.8.0 (set by /Users/chetan/.pyenv/version)
4. Check the Python Version
Now after installation lets check the python version with the following command.
$ python3 --version
Python 3.8.0
Python 3.8.0 is installed successfully.
Please let me know how you like the tutorial.
If you like this tutorial please consider buying me a coffee!
Read Also: How to remove rvm on Mac
Source: pyenv
Much appreciated…