Build a Python development environment using pyenv on MacOS

With pyenv, multiple versions of python can coexist, which is very convenient.

Install pyenv

brew install pyenv-virtualenv pyenv

pyenv settings

~/.zshrc


# pyenv
export PYENV_ROOT="${HOME}/.pyenv"
export PATH=${PYENV_ROOT}/bin:$PATH
eval "$(pyenv init -)"

Reflected in ** source ~ / .zshrc **

Introduction of pyenv-pip-rehash

Introduced pyenv-pip-rehash, an automation tool for pyenv rehash

git clone https://github.com/yyuu/pyenv-pip-rehash.git ~/.pyenv/plugins/pyenv-pip-rehash

install python

#List of versions that can be installed
pyenv install -l

#I wanted to use anaconda, so I installed the latest version of anaconda
pyenv install anaconda3-4.0.0

#Check the installed version
pyenv versions

#switching
pyenv global anaconda3-4.0.0

Check if the installed anaconda can be used

#Command location
which python                                                   
/Users/yudsuzuk/.pyenv/shims/python

#Version confirmation
python --version                                                
Python 3.5.1 :: Anaconda 4.0.0 (x86_64)

ipython notebook

I got it

Recommended Posts

Build a Python development environment using pyenv on MacOS
Build a Python environment on your Mac using pyenv
Build a python environment on MacOS (Catallina)
Until building a Python development environment using pyenv on Ubuntu 20.04
Build a Python development environment on your Mac
Build a Python development environment on Raspberry Pi
Build a GVim-based Python development environment on Windows 10 (3) GVim8.0 & Python3.6
Notes on creating a python development environment on macOS Catalina
Build a GVim-based Python development environment on Windows 10 (1) Installation
Python development environment construction on macOS
Build a python3 environment on CentOS7
Build a python machine learning study environment on macOS sierra
Create a Python (pyenv / virtualenv) development environment on Mac (Homebrew)
Build a GVim-based Python development environment on Windows 10 (2) Basic settings
Python development environment for macOS using venv 2016
Build a python virtual environment with pyenv
Build a Python + OpenCV environment on Cloud9
Build a local development environment for Lambda + Python using Serverless Framework
How to build a Python environment using Virtualenv on Ubuntu 18.04 LTS
Build Python3.5 + matplotlib environment on Ubuntu 12 using Anaconda
Simply build a Python 3 execution environment on Windows
Build a python environment with ansible on centos6
Build a Python environment on Mac (Mountain Lion)
Install Python 3.8.6 on macOS Big Sur using pyenv
[Python] Build a Django development environment with Docker
Build a simple Python virtual environment without pyenv
Build a Kubernetes environment for development on Ubuntu
Set up a Python development environment on Marvericks
Create a Python virtual development environment on Windows
Build Python environment on Windows
[ev3dev × Python] Build ev3dev development environment
Build python environment on windows
Build a Python environment offline
How to set up a Python environment using pyenv
# 2 Build a Python environment on AWS EC2 instance (ubuntu18.04)
Build a local development environment for Laravel6.X on Mac
Create a comfortable Python 3 (Anaconda) development environment on windows
How to build a Django (python) environment on docker
Build a Python virtual environment using venv (Django + MySQL ①)
Build a machine learning application development environment with Python
How to build a Python environment on amazon linux 2
Create a Python development environment on OS X Lion
Build a lightweight Fast API development environment using Docker
Building a Python environment on Mac
Prepare Python development environment on Ubuntu
Build a go environment using Docker
Building a Python environment on Ubuntu
Introducing Python using pyenv on Ubuntu 20.04
Create a Python environment on Mac (2017/4)
Notes on installing Python using PyEnv
Create a python environment on centos
Install Python development environment on Windows 10
Install Python on CentOS using Pyenv
Build Python 3.8 + Pipenv environment on Ubuntu 18.04
Install Python on CentOS using pyenv
Build a machine learning environment on mac (pyenv, deeplearning, opencv)
Build an environment for machine learning using Python on MacOSX
How to build a new python virtual environment on Ubuntu
Building a Jupyter Lab development environment on WSL2 using Anaconda3
Build an Ubuntu python development environment on Google Cloud Platform
Building a Python environment on a Mac and using Jupyter lab