Python Virtual Environment on Windows

Python Virtual Environment on Windows

To create python virtual Environment, first install python from Python Official Website.

After successful installation, add information to Environmental Variables of Windows:

Setting Environmental Variables on Windows

 

 

Setting Environmental Variables on WindowsChanging Path of Environmental Variables on WindowsChanging Path of Environmental Variables on Windows

At the end of Path Variable, insert semi-colon (;) and then add path to your Paython Directory and Python Scripts Directory, which may appear like:

instead of <user-name> enter the name of your windows login user account as shown below:

Click Okay to all tabs and close all tabs.

 

Creating Virtual Environment:

If you already had opened command prompt window, before adding path to environmental variables, please close it and re-open the command prompt.

Now execute the following one by one:

 

 

 

Where py3 is the name of virtual environment.

if Virtual Environment is not already activated, you can activate it by executing:

 

And you are done with installing virtual Environment.

 

Related Links:

Leave a Reply