What are Python Virtual Environments?
A virtual environment is a folder containing the dependencies required by a particular Python shell driver or script that is running in CloudShell. This enables running different drivers and scripts with different dependencies simultaneously.
Therefore, whenever a Python driver or script runs in an execution server for the first time, CloudShell creates a new virtual environment in the execution server for that driver or script, and installs, in the virtual environment, the dependencies specified in the driver or script's requirements.txt file. This virtual environment is used in subsequent runs of the driver or script on that execution server. However, if a newer version of the shell or script runs, or the same script is run with a different python version, CloudShell will create a new virtual environment for the updated driver or script, but will only delete the old virtual environment when the execution server is restarted. The installation path of the virtual environment is: %PROGRAMDATA%\QualiSystems\venv.
Note: Using the driver or script for the first time on the execution server may take some setup time to create the new virtual environment and install the dependencies. The next time the same Python driver script is used, any new dependencies uploaded to the Python Package Index (PyPI) repository for this driver or script will be installed. Any existing dependencies will be reused without any changes (and will not require additional setup time).