By creating a virtual environment, it is possible to prevent problems due to version differences and batting with other built environments.
python -m venv venv
↓
source venv/bin/activate
For most people this is fine
↓
source venv/bin/activate.fish
Click here for fish (Search Results Web results)
↓
(venv) ?? @ ??? ~ / web>
(Venv) is displayed at the beginning
deactivate
↓
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 binary (matching the version of the binary used to create this virtual environment), and you can install a separate set of Python packages in the site directory for each virtual environment.
↓
Although it is a special case, if you are using an old development environment such as django1 in a company etc. If you are developing using django3 privately, use venv to build an environment where django1 and django3 coexist. Can be done. You can prevent errors by any chance
↓
Recent environment apps are less likely to cause conflict errors unless there is a lot of trouble (I'm not saying that they will not), so there is little advantage in using venv for the trouble.
↓
To use venv, you need an environment where python3 is installed.
At the terminal
python -V
↓
Python 3.X.X
If it is output, python3 is installed in os.
↓
↓
Launch terminal
↓
pacman -S python
↓
python3 -V
↓
Python 3.X.X
↓
python -m venv venv
↓
A venv folder is created in the current hierarchy of the terminal
↓
source venv/bin/activate
For most people this is fine
source venv/bin/activate.fish
Click here for fish (Search Results Web results)
↓
(venv) ?? @ ??? ~ / web>
(Venv) is displayed at the beginning
↓
With (venv) displayed at the beginning
pip install -U pip
To build the venv development environment, always run pip with (venv) at the beginning.
Delete venv folder
↓
↓
Thank you for watching until the end. I'm glad if you can use it as a reference.
↓
We will continue to update useful information. I am delighted to jump to your help. Thank you very much.