Venv usage tutorial and the difference between pyvenv and python3-venv

It is recommended to use python3-venv

Reason: The official announcement stated that pyvenv has been deprecated since version 3.6

Original text: pyvenv is the recommended tool for creating virtual environments for Python 3.3 and 3.4, and is deprecated in Python 3.6.

Create a virtual environment under Linux (taking Ubuntu as an example)

First install dependency packages

sudo apt-get install python3-pip python3-venv

Create a virtual environment based on python3 named test

python3 -m venv test

Activate test environment

. ./test/bin/activate

Guess you like

Origin blog.csdn.net/qq_42183962/article/details/132255616
Recommended