Virtual Environments With virtualenvwrapper for windows

Photo by Sergey Zolkin on Unsplash

If you are a python developer, you would have faced some situations where you spend hours installing the libraries you need, only to find you have broken some piece of code you have already written. Sometimes certain packages support only some specific version, which may conflict with your other codes.

The solution is to create a virtual environment where you can play around by keeping the packages detached from your code's rest. This post will help you in setting up a virtual environment. These instructions are for Windows.

Step 1: Install the python virtual environment package.

Let’s first install the python package required.

pip install virtualenvwrapper-win

Step 2: Creating an environment

Run the below command to create a new environment where env_name specifies the name of the environment you want to create.

mkvirtualenv env_name

Step 3: Activating the environment

To activate the environment, use the below command.

workon env_name

After running, make sure the environment name is mentioned before the path, as shown in the image below.

Step 4: Deactivating the environment

To exit from the environment, use the below command.


Listing the environments created

To list all the environments installed, you can use,


For creating virtual environments in an anaconda and use it inside jupyter, see here.




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Implementing Refined Marketing at Low Costs with Game Publishers

Is Your Software Ready for Black Friday?

BigQuery Geospatial query tricks

How to Configure Iptables on ECS Ubuntu 16.04

Transaction: ACID

CS373 Spring 2022: Luca Santos

Using CrateDB with PHP PDO for a Real-Time IoT Project on Alibaba Cloud

Oracle WebLogic Remote/Outbound URL Monitoring

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


More from Medium

How I made a GUI Application in C using GTK Library.

How We are Making a Video Game in Python #5

#1.2 Installing a Code Editor (IDE) — Python for Beginners

A red Python looking into the camera

What is Gunicorn?