How to use Virtualenv

I will describe two methods.

Notation notes

# :Run as root.
$ :General user(Other than root)Run with.

Building a virtual environment

Only virtualenv Build in the current directory.

$ virtualenv --python=/usr/local/bin/python project-env

With virtualenvwrapper Build under $ WORKON_HOME set in Python3.4 installation.

$ mkvirtualenv --python=/usr/local/bin/python project-env

Activate the virtual environment

Execute before using the virtual environment. Only virtualenv

$ cd /var/www/python
$ source ./project-env/bin/activate

With virtualenvwrapper

$ workon project-env

The virtual environment project-env under the home directory is activated.

Deactivate the virtual environment

Execute when exiting the virtual environment. Only virtualenv & With virtualenvwrapper

$ deactivate

Recommended Posts

How to use virtualenv
How to use Virtualenv
How to use virtualenv
[Note] How to use virtualenv
[Python] How to use virtualenv
How to use virtualenv with PowerShell
How to use xml.etree.ElementTree
How to use Python-shell
How to use tf.data
How to use Seaboan
How to use image-match
How to use shogun
How to use Pandas 2
How to use numpy.vectorize
How to use pytest_report_header
How to use partial
How to use Bio.Phylo
How to use SymPy
How to use x-means
How to use WikiExtractor.py
How to use IPython
How to use Matplotlib
How to use iptables
How to use numpy
How to use TokyoTechFes2015
How to use venv
How to use dictionary {}
How to use Pyenv
How to use list []
How to use python-kabusapi
How to use OptParse
How to use return
How to use dotenv
How to use pyenv-virtualenv
How to use Go.mod
How to use imutils
How to use import
How to use Qt Designer
How to use search sorted
[gensim] How to use Doc2Vec
python3: How to use bottle (2)
How to use the generator
[Python] How to use list 1
How to use FastAPI ③ OpenAPI
How to use Python argparse
How to use IPython Notebook
How to use Pandas Rolling
How to use redis-py Dictionaries
Python: How to use pydub
[Python] How to use checkio
[Go] How to use "... (3 periods)"
How to use Django's GeoIp2
[Python] How to use input ()
How to use the decorator
[Introduction] How to use open3d
How to use Python lambda
How to use Jupyter Notebook
python3: How to use bottle (3)
python3: How to use bottle
How to use Google Colaboratory
How to use Python bytes