Install pyenv on mac

Install pyenv (Mac)

pyenv is a tool that uses multiple versions of python properly. I think it will be convenient later to install python using pyenv.

pyenv is a tool that uses multiple versions of Python. When using python, it is convenient to install pyenv first.

1. Install Homebrew

Copy the command below and paste it into your terminal Enter

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2. Install pyenv with Homebrew

Execute the following command in the terminal

brew install pyenv

3. Pass the path (OS is Catalina or later)

Copy and execute the following command line by line in the terminal

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc

Apply the contents written in zshrc

source ~/.zshrc

3. Pass through (OS is before Catalina)

For OS older than Catalina: Copy and execute the following command line by line in the terminal

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile

Apply the contents written in bash_profile

source ~/.bash_profile

4. Try installing python 3.7.3.

Install the same version that was included by default

pyenv install 3.7.3

4. Switch versions

For some reason, you may have a python-version in your home directory. If there is this, it can not be switched, so delete it with the following command

rm ~/.python-version

Version switching

pyenv global 3.7.3

pyenv command

List of versions that can be installed

pyenv install --list

Installed version and currently in use version (currently in use marked with *)

pyenv versions

Recommended Posts

Install pyenv on mac
Install Tensorflow on Mac
Pyenv + virtualenv on Mac
Install Ansible on Mac
Install Python on Mac
Install Python 3 on Mac
Install Python 3.4 on Mac
Install Caffe on Mac
Install pyenv on OSX
Install mecab on mac
Install mecab-python on Mac
Install pygame on python3.4 on mac
Install module on Anaconda (Mac)
Install OpenPose on mac (Catalina)
Install numba on your Mac
Install pandas 0.14 on python3.4 [on Mac]
Install Django on your Mac
Pyenv on Mac OSX Mavericks
Install pillow on Mac OSX 10.9
[Mac] Tips: Install pyquery on Mac [pyquery]
Catalina on Mac and pyenv
Install Python environment on local PC (pyenv, venv on Mac)
Install anaconda on Mac → Add Library
How to install mysql-connector-python on mac
Steps to install matplotlib on Mac
Install Sphinx on Mac OS X
Install Python 3.7 Anaconda on MAC, but Python 2
Install Scipy on Mac OS Sierra
Install python3 on Mac (El Capitan)
Install pyenv on EC2 (Amazon Linux)
How to install OpenCV on Mac
Install mitmproxy on Mac OS X
Install VirtualBox on CentOS 7 on VirtualBox (mac + vagrant)
Install Python on CentOS using Pyenv
Steps to install python3 on mac
Install python2.x on catalina with pyenv
Install Python on CentOS using pyenv
(Beginner) Notes on using pyenv on Mac
Install pgmagick on Mac OS X 10.9
python on mac
Install opencv on Mac using Anaconda Navigator
How to install drobertadams / toggl-cli on Mac
Put Anaconda on your Mac using Pyenv
Notes on building Python and pyenv on Mac
Install anaconda on a new Mac anyway
Install pyenv and Python 3.6.8 on Ubuntu 18.04 LTS
[mac] Install R in pyenv + Jupyter-Lab environment
Install pyenv and rbenv on CentOS system-wide
How to install Theano on Mac OS X 10.10 (using pyenv, anaconda)
Install mecab on Marvericks
Install python on WSL
Install Faiss on CentOS 7
Install pip on Mavericks
Install pip, pyenv, BeautifulSoup4
Install pyenv and pyenv-virtualenv
Install Python on Pidora.
Install mongodb on termux
Install Scrapy on python3
Install docker on Fedora31
Install numba on CentOS 7.2
Install Python 3.8.6 on macOS Big Sur using pyenv