How to build a Python environment using Virtualenv on Ubuntu 18.04 LTS

I used to be a pyenv believer, but I decided to change my mind by reading Flowchart whether pyenv is needed --Qiita. So, I would like to summarize how to build a Python environment using Virtualenv on Ubuntu 18.04 LTS.

Assumed reader

This article is for people who fall under the following.

What is Virtualenv

It is a tool to separate the environment like the environment for project A, the environment for project B ... etc. There is an advantage that you can prepare an execution environment and libraries suitable for each environment without polluting the Python environment installed on the system.

Installation method

Run the sudo apt install virtualenv virtualenvwrapper command to install Virtualenv.

How to create an environment

Execute the mkvirtualenv --python = / usr / bin / {python execution command} {environment name} command.

Python version Execution command
Python 2.x python
Python 3.x python3

How to use the environment

Enter the environment

Execute the workon {environment name} command.

Get out of the environment

Execute the deactivate command.

How to delete the environment

Execute the rmvirtualenv {environment name} command.

Related article

References

Recommended Posts

How to build a Python environment using Virtualenv on Ubuntu 18.04 LTS
How to build a new python virtual environment on Ubuntu
How to build a Python environment on amazon linux 2
[Latest] How to build Java environment on Ubuntu
How to run MeCab on Ubuntu 18.04 LTS Python
How to build Java environment on Ubuntu (Linux)
How to set up a Python environment using pyenv
# 2 Build a Python environment on AWS EC2 instance (ubuntu18.04)
Build a Python environment on your Mac using pyenv
Build a Python development environment using pyenv on MacOS
Build Python 3.8 + Pipenv environment on Ubuntu 18.04
Build a python3 environment on CentOS7
How to build an environment for using multiple versions of Python on Mac
How to build a python2.7 series development environment with Vagrant
A story when a beginner gets stuck trying to build a vim 8.2 + python 3.8.2 + lua plugin environment on Ubuntu 18.04.4 LTS
Until building a Python development environment using pyenv on Ubuntu 20.04
How to build a beautiful Python environment on a new Mac and install Jupter Notebook
How to create a Python 3.6.0 environment by putting pyenv on Amazon Linux and Ubuntu
Memo A beginner tried to build a Java environment and Japaneseize it on Ubuntu 18.04.2 LTS.
How to build a sphinx translation environment
Build Python3 and OpenCV environment on Ubuntu 18.04
Build a python environment on MacOS (Catallina)
I want to build a Python environment
Steps to install Python environment on Ubuntu
Build a Python + OpenCV environment on Cloud9
How to build a LAMP environment using Vagrant and VirtulBox Note
# 3 Build a Python (Django) environment on AWS EC2 instance (ubuntu18.04) part2
Try using virtualenv, which can build a virtual environment for Python
When I tried to build a Rails environment on WSL2 (Ubuntu 20.04LTS), I stumbled and fell.
build Python on Ubuntu
How to create a Python virtual environment (venv)
Ubuntu18.04.05 Creating a python virtual environment in LTS
Build python environment with pyenv on EC2 (ubuntu)
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)
Build a Python development environment on your Mac
[Venv] Create a python virtual environment on Ubuntu
Build a Kubernetes environment for development on Ubuntu
Build a Python development environment on Raspberry Pi
How to build a Python virtual execution environment using Visual Studio Code and pipenv on a Windows machine (also Jupyter notebook)
[2015/11/19] How to register a service locally using the python SDK on naoqi os
Build a GVim-based Python development environment on Windows 10 (3) GVim8.0 & Python3.6
Build a Django development environment using pyenv-virtualenv on Mac
How to quickly create a morphological analysis environment using Elasticsearch on macOS Sierra
Build a python virtual environment with virtualenv and virtualenvwrapper
Build a machine learning Python environment on Mac OS
Build python3 environment with ubuntu 16.04
Build a GVim-based Python development environment on Windows 10 (1) Installation
Build Python environment on Windows
Build a Python development environment on Mac OS X
Build a Python virtual environment using venv (Django + MySQL ①)
How to make a Python package using VS Code
Build a python virtual environment with virtualenv and virtualenvwrapper
Build python environment on windows
How to build a development environment for TensorFlow (1.0.0) (Mac)
Build a Python environment offline
How to execute a command using subprocess in Python
[Python] How to use virtualenv
Create a web application execution environment of Python3.4 + Nginx + uWSGI + Flask with haste using venv on Ubuntu 14.04 LTS
Build a machine learning environment using PyCharm on Ubuntu environment (TensorFlow will also be introduced!)