DEV Community

Cover image for Setup and use Virtualenv in Python Applications
Wesley Bertipaglia
Wesley Bertipaglia

Posted on

Setup and use Virtualenv in Python Applications

virtualenv is a simple to use tool to create isolated Python environments.

For more information visit: virtualenv documentation.

Installation:



pip install virtualenv


Enter fullscreen mode Exit fullscreen mode

Creating a Virtual Environment:



virtualenv <env_name>


Enter fullscreen mode Exit fullscreen mode

Activating the Virtual Environment:

  • On Unix-like systems (Unix, Linux, or MacOS): ```bash

source /bin/activate


- On Windows:
```bash


<env_name>\Scripts\activate


Enter fullscreen mode Exit fullscreen mode

Deactivating the Virtual Environment:



deactivate


Enter fullscreen mode Exit fullscreen mode

Top comments (0)