twelve virtual environments and packages introduction python applications will often use packages and modules that don' come as part of the standard library applications will sometimes need specific version of librarybecause the application may require that particular bug has been fixed or the application may be written using an obsolete version of the library' interface this means it may not be possible for one python installation to meet the requirements of every application if application needs version of particular module but application needs version then the requirements are in conflict and installing either version or will leave one application unable to run the solution for this problem is to create virtual environmenta self-contained directory tree that contains python installation for particular version of pythonplus number of additional packages different applications can then use different virtual environments to resolve the earlier example of conflicting requirementsapplication can have its own virtual environment with version installed while application has another virtual environment with version if application requires library be upgraded to version this will not affect application ' environment creating virtual environments the module used to create and manage virtual environments is called venv venv will usually install the most recent version of python that you have available if you have multiple versions of python on your systemyou can select specific python version by running python or whichever version you want to create virtual environmentdecide upon directory where you want to place itand run the venv module as script with the directory pathpython - venv tutorial-env this will create the tutorial-env directory if it doesn' existand also create directories inside it containing copy of the python interpreterthe standard libraryand various supporting files once you've created virtual environmentyou may activate it on windowsruntutorial-env\scripts\activate bat on unix or macosrunsource tutorial-env/bin/activate