How to Install and Use Virtualenv on Linux
YogSec

YogSec @yogsec

About: YogSec is a web security research initiative. We analyze how web applications break, why vulnerabilities happen, and how developers can fix them.

Location:
Meerut, India
Joined:
Mar 5, 2025

How to Install and Use Virtualenv on Linux

Publish Date: Jul 21 '25
0 0

Why Use Virtualenv?

When you're juggling multiple Python projects, you might need different versions of libraries for each. Installing everything globally can quickly become a mess. Virtual environments isolate your project’s dependencies, making development more manageable and cleaner.

Step 1: Install Virtualenv

sudo apt update
sudo apt install python3-virtualenv

Enter fullscreen mode Exit fullscreen mode

OR

pip3 install virtualenv

Enter fullscreen mode Exit fullscreen mode

Step 2: Create a Virtual Environment

virtualenv venv

Enter fullscreen mode Exit fullscreen mode

Step 3: Activate the Environment

source venv/bin/activate

Enter fullscreen mode Exit fullscreen mode

Comments 0 total

    Add comment