[PYTHON] pyenv summary

__ * Before reading this article, we recommend that you refer to Flowchart whether pyenv is required --Qiita. __

I would like to summarize about pyenv.

What is pyenv

In Linux, it is a tool that manages the execution environment of Python (for example, I think that it is supposed to be used properly for 2.x series and 3.x series).



  1. Install anyenv according to anyenv Summary-Qiita.
  2. For Ubuntu, execute the following command to install the packages required to install the Python execution environment and the packages that speed up the download of the execution environment.
$ sudo apt install curl llvm sqlite3 libssl-dev libbz2-dev libreadline-dev libsqlite3-dev libncurses5-dev libncursesw5-dev python-tk python3-tk tk-dev aria2
  1. Execute the following command to install pyenv.
$ anyenv install pyenv
  1. Execute the following command to enable the pyenv command.
$ source ~/.bashrc

pyenv-virtualenv This plugin is used when you want to generate multiple execution environments based on a certain execution environment.

  1. Execute the following command to install pyenv-virtualenv.
$ git clone https://github.com/yyuu/pyenv-virtualenv $(pyenv root)/plugins/pyenv-virtualenv

pyenv-ccache By using ccashe (see accelerate C / C ++ compilation with ccache-Qiita), you can use CPython (official Python implementation). A plug-in that speeds up installation.

  1. Install ccashe (for Ubuntu, run the following command).
$ sudo apt install ccache
  1. Execute the following command to install pyenv-ccache.
$ git clone https://github.com/yyuu/pyenv-ccache $(pyenv root)/plugins/pyenv-ccache

pyenv-pip-update A plugin that makes it easy to update libraries managed by pip and conda.

  1. Run the following command to install pyenv-pip-update.
$ git clone https://github.com/massongit/pyenv-pip-update $(pyenv root)/plugins/pyenv-pip-update


command Contents
$ pyenv help
$ pyenv root Absolute path to install pyenv
$ pyenv shell Execution environment in the shell
$pyenv shell execution environment name Setting the execution environment in the shell
$ pyenv global Default execution environment
$pyenv global execution environment name Default execution environment settings
$pyenv install execution environment name Installation of the specified execution environment
$pyenv uninstall execution environment name Uninstall the specified execution environment
$ pyenv pip-update Library updates managed by pip and conda(pyenv-pip-update)
* Execution environment that uses conda(anaconda and miniconda)For, update only the libraries managed by conda
$pyenv virtualenv execution environment(A)Name Execution environment(B)Name pyenv installExecution environment installed in(A)Execution environment based on(B)To generate(pyenv-virtualenv)
$ pyenv versions List of installed execution environments


Recommended Posts

pyenv summary
Summary of pyenv usage
Python Summary
pyenv note
samba summary
pyenv notes
system-wide pyenv
python-pptx summary
pyenv memo
Linux Summary
Python summary
Django Summary
String summary 1
pytest summary
matplotlib summary
AtCoderBeginnerContest180 Review & Summary
Kaggle Summary: Outbrain # 2
LINQ library summary
Sphinx setup summary
AtCoderBeginnerContest181 Review & Summary
Digital technology summary
AtCoderBeginnerContest182 Review & Summary
Python tutorial summary
blockdiag grammar summary
AtCoderBeginnerContest183 Review & Summary
Linux Command Summary
Kaggle Summary: Outbrain # 1
pyenv installation notes
pyenv for linux
update, upgrade summary
pyenv + anaconda + python3
Standard input summary
Django filter summary
python related summary
2020 IT Conference Summary
Visualize summary statistics
pyenv cheat sheet
pytest usage summary
pyenv + pyenv-virtualenv (CentOS7)
Docker command summary
Python basics summary
Kaggle related summary