How to Install pip and Setup Virtual Environment in Windows

pip is an install manager in python. So, before installation pip, I think you have already installed python. Assume your python is installed in E drive.

  1. To install pip at first Download get-pip.py, in your computer E: drive
  2. now open cmd and go to E: drive
  3. run the below command
E:\>python get-pip.py

now add the below line in environment setup path.

E:\Python\Python38-32\Scripts

Ok! pip is ready.

Now we will setup virtual environment in windows.

Run command prompt and type.

E:\>pip install virtualenv

now you can create virtual environment for your any project. For this, go to your project directory. Let say your project name is Hello_Project in E drive. So, go to the project by cmd and run the below command

E:\>virtualenv env

Then a folder will be crated in your project with some scripts file and sub directories. Now run the below command to activate virtual nvironment.

E:\Hello_Project\env\Scripts\activate

Wow! virtual environment is activated for your new project.

Leave a Reply

Your email address will not be published. Required fields are marked *