python development environment -use of pyenv and virtualenv-

About python development environment construction

Overview

--Enables independent management of multiple versions of python for each development environment

Description of each tool

pyenv --A tool for switching versions of multiple versions of Python environment according to the purpose

pyenv-virtualenv --Pyenv plugin that allows you to switch environments between the same versions, which is not possible with pyenv

Premise

--Using zsh on OSX --Use homebrew

Introduction method

pyenv --clone from github

git clone git://github.com/yyuu/pyenv.git ~/.pyenv --Added to ./zshrc

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

pyenv-virtualenv --Install virtualenv from homebrew

brew install pyenv-virtualenv

How to Use

--Check the installable version

pyenv install -l

--Installation (the following is for python2.7.10)

pyenv install 2.7.10

--Need to rehash after installation

pyenv rehash

--Check available versions (environment where * mark is in use)

pyenv versions

--Prepare an alias environment with the same version of python using virtualenv (create 2.7.10_sand below)

pyenv virtualenv 2.7.10 2.7.10_sand

--Set the environment for each directory (the following is set to 2.7.10_sand)

pyenv local 2.7.10_sand

Recommended Posts

python development environment -use of pyenv and virtualenv-
Python3 TensorFlow environment construction (Mac and pyenv virtualenv)
Use multiple versions of python environment with pyenv
Mechanism of pyenv and virtualenv
[Python] Chapter 01-02 About Python (Execution and installation of development environment)
Environment construction of python and opencv
Create a Python (pyenv / virtualenv) development environment on Mac (Homebrew)
Use smbus with python3 under pyenv environment
Use of virtualenv, Python's independent execution environment
Clean python environment with pythonz and virtualenv
Build Python development environment (pythonz, virtualenv, direnv)
Construction of Python local development environment Part 1 (pyenv, pyenv-virtualenv, pip installation)
Unification of Python environment
Building a python environment with virtualenv and direnv
Python development environment construction
Installation of Python3 and Flask [Environment construction summary]
About Python development environment
python2.7 development environment construction
Python virtual environment construction (2017 version) pyenv and pyenv-virtualenv and virtualenv and virtualenv wrapper and pyvenv and venv
Development environment in Python
Continuation of multi-platform development with Electron and Python
Comparison of Python and Ruby (Environment / Grammar / Literal)
I want to use Python in the environment of pyenv + pipenv on Windows 10
Build a python virtual environment with virtualenv and virtualenvwrapper
Use Python installed with pyenv for PL / Python execution environment
A story of trying out pyenv, virtualenv and virtualenvwrapper
Build a python virtual environment with virtualenv and virtualenvwrapper
Manage Python runtime packages and development environment packages with Poetry
Build a Python development environment using pyenv on MacOS
python memo (for myself): About the development environment virtualenv
Use python installed with Pyenv with Sublime REPL of Sublime Text 3
Use Anaconda in pyenv environment
Manage python environment with virtualenv
Organize your Python development environment
Python environment construction and TensorFlow
[ev3dev × Python] Build ev3dev development environment
Coexistence of pyenv and autojump
Use and integration of "Shodan"
[MEMO] [Development environment construction] Python
[For organizing] Python development environment
python with pyenv and venv
[Python] Anaconda, pyenv, virtualenv, .bash_profile
Source installation and installation of Python
Environment construction of python2 & 3 (OSX)
[Python] How to use virtualenv
Python environment construction on Mac (pyenv, virtualenv, anaconda, ipython notebook)
[Python of Hikari-] Chapter 08-03 Module (Import and use of standard library)
Unify the environment of the Python development team starting with Poetry
Pros and cons of converting Django's development environment to Docker
Construction of Python local development environment Part 2 (pyenv-virtualenv, pip usage)
Install pyenv on MacBook Air and switch python to use
Comparison of how to use higher-order functions in Python 2 and 3
Get a clean Python development environment with pyenv + pipx + Poetry
Smooth Python development environment for teams [Poetry + pyenv + black + isort]
pyenv, virtualenv Use docker to manage the environment without using
[Tips] Problems and solutions in the development of python + kivy
Until building a Python development environment using pyenv on Ubuntu 20.04
Overview of Python virtual environment and how to create it
The story of Python and the story of NaN
Installation of SciPy and matplotlib (Python)
Prepare Python development environment on Ubuntu