Menu
User

DropVPS Team

Writer: Cooper Reagan

How to install pip in virtual environment Windows?

How to install pip in virtual environment Windows?

Publication Date

04/13/2025

Category

Articles

Reading Time

3 Min

Table of Contents

If you’re working with Python projects on Windows, using a virtual environment is pretty much a must. It keeps your dependencies isolated and avoids system-level conflicts. But sometimes, especially on new setups, people get confused when pip isn’t found inside the virtual environment. Don’t worry — here’s how to install and use pip inside a Python virtual environment on Windows, step by step.

First, Check Python Installation

Before anything, make sure Python is installed and added to your PATH.

To check:

python --version

If you get an error, you’ll need to install Python from python.org. During installation, make sure you check the box that says:

Add Python to PATH

Create a Virtual Environment

Navigate to your project folder or create a new one:

mkdir myproject
cd myproject

Now create the virtual environment:

python -m venv venv

This will create a folder named venv/ which contains everything for your virtual environment — including its own copy of python and pip.

Activate the Virtual Environment

On Windows, activation is done using the Scripts folder:

venv\Scripts\activate

After running that, you’ll see your prompt change to something like this:

(venv) C:\Users\YourName\myproject>

That’s how you know the virtual environment is active.

Check if pip is Installed

Once you’re inside the virtual environment, check for pip:

pip --version

If you see the version info, you’re good. It should output something like:

pip 24.0 from ...\myproject\venv\lib\site-packages\pip

But if pip is missing or gives you an error, continue to the next step.

Installing pip Manually Inside venv (if needed)

Sometimes, pip doesn’t install correctly in the venv — especially if your system Python is broken or missing ensurepip.

To force-install pip manually:

python -m ensurepip --upgrade

Then run:

python -m pip install --upgrade pip

This ensures you’re on the latest version and everything is clean.

Now You’re Ready to Install Packages

You can now install packages like usual, for example:

pip install requests

All packages will be installed inside the virtual environment and won’t touch your system Python — which is exactly what you want in a proper development setup. If you’re using an IDE like VS Code, make sure you select the interpreter from the venv folder so your project uses the right environment automatically.

Windows VPS
U
Loading...

Related Posts