django3 tutorial #1 How to install venv


Introduction of venv virtual environment

The venv module provides support for creating lightweight "virtual environments". Since the setting environment can be separated for each site by introducing a virtual environment, it is possible to suppress errors that occur due to version upgrades, etc.

venv has a site directory for each virtual environment, which can be separated from the system site directory. Each virtual environment has its own Python binaries (corresponding to the version of the binary used to create this virtual environment), and independent Python packages can be installed in each virtual environment's site directory.

Development environment

・Arch linux

install python3

Launch terminal

pacman -S python

python3 -V

Python 3.X.X

Is output

mkdir web create web directory

cd web

go to web directory

create venv

python3 -m venv venv

How to start venv with bash or zsh shell

source venv/bin/activate

Most people are okay with this

How to start venv with fish shell

source venv/bin/

Click here for fish(Search Results Web results)

(venv) ??@??? ~/web>

(Venv) is displayed at the beginning

that's all. Thank you for your hard work.