⊗pyPmEvInr 91 of 128 menu

Virtual Environment in Python

When developing multiple applications on the same Python system, conflicts between different library versions may arise. For example, one application was written on an earlier version, while the second requires the latest version.

To solve this problem, Python has a special virtual environment. It allows you to run each application with its own set of library versions in separate projects. At the same time, the versions and dependencies of one project do not affect the dependencies of another.

To create a virtual environment, special utilities are used. The most popular of them at the moment is venv.

In Windows OS venv is installed by default, but in Linux it is not. So if you are using Linux, then to proceed further you need to run the following command:

sudo apt install -y python3-venv
enru