Notes on deploying pyenv with Homebrew and managing Python versions

This is a work memo when I introduced pyenv in Homebrew and made it possible to manage the Python version of the work environment.

Prerequisite environment

procedure

① Install pyenv

$ brew install pyenv

② Activation

$ eval "$(pyenv init -)"

If you want to do it automatically from the next time onward, please describe as follows in ~ / .bash_profie etc.

~/.bash_profile


eval "$(pyenv init -)"

③ Install Python

For example, if you want to install version 3.5.0

$ pyenv install 3.5.0

Then switch the version used in the work environment to 3.5.0.

$ pyenv global 3.5.0

Let's check the version.

$ python --version

Python 3.5.0

that's all

Recommended Posts

Notes on deploying pyenv with Homebrew and managing Python versions
Notes on building Python and pyenv on Mac
Notes on setting pyenv and python environment using Homebrew on Mac OS Marvericks
Notes on pyenv and Atom
python with pyenv and venv
Notes on HDR and RAW image processing with Python
Notes on Python and dictionary types
Notes on installing Python using PyEnv
Notes on using rstrip with python.
Error and solution when installing python3 with homebrew on mac (catalina 10.15)
A memo with Python2.7 and Python3 on CentOS
Notes on doing Japanese OCR with Python
Install pyenv and Python 3.6.8 on Ubuntu 18.04 LTS
Read the file with python and delete the line breaks [Notes on reading the file]
Create a Python3 environment with pyenv on Mac and display a NetworkX graph
Build python environment with pyenv on EC2 (ubuntu)
Notes on installing Python3 and using pip on Windows7
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
I wanted to install Python 3.4.3 with Homebrew + pyenv
Use multiple versions of python environment with pyenv
Developed and verified with multiple python versions with direnv
Put Python 2.7.x on Mac OSX 10.15.5 with pyenv
Install Python 3 on MacOS Catalina (with Homebrew only)
Notes from installing Homebrew to building an Anaconda environment for Python with pyenv
Install python with pyenv
Install selenium on Mac and try it with python
Get comments on youtube Live with [python] and [pytchat]!
Install the latest stable Python with pyenv (both 2 and 3)
Ubuntu 20.04 on raspberry pi 4 with OpenCV and use with python
Start numerical calculation in Python (with Homebrew and pip)
Email hipchat with postfix, fluentd and python on Azure
Install pyenv on Raspberry Pi and version control Python
Install the latest Python from pyenv installed with homebrew
Minimum notes when using Python on Mac (Homebrew edition)
Programming with Python and Tkinter
Encryption and decryption with Python
Notes on tf.function and Tracing
How to install Python2.7 python3.5 with pyenv (on RHEL5 CentOS5) (2016 Nov)
Python and hardware-Using RS232C with Python-
Python on Ruby and angry Ruby on Python
Create a Python (pyenv / virtualenv) development environment on Mac (Homebrew)
Notes on * args and ** kargs
Test Python with Miniconda on OS X and Linux with travis-ci
Install pyenv on MacBook Air and switch python to use
Notes on installing Python on Mac
How to do Bulk Update with PyMySQL and notes [Python]
Reinstall python with pyenv with -fPIC
Install pyenv from Homebrew, install Python from pyenv
Catalina on Mac and pyenv
[Python] Notes on while statements (writing style and infinite loop)
Notes on installing Python on CentOS
Notes on reading and writing float32 TIFF images in python
Works with Python and R
Build a 64-bit Python 2.7 environment with TDM-GCC and MinGW-w64 on Windows 7
Build a Python environment on your Mac with Anaconda and PyCharm
Get data from MySQL on a VPS with Python 3 and SQLAlchemy
How to use python put in pyenv on macOS with PyCall
[Python] Error and solution memo when using venv with pyenv + anaconda
Install lp_solve on Mac OS X and call it with python.
Communicate with FX-5204PS with Python and PyUSB
Shining life with Python and OpenCV