A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/python/creating-python-virtual-environment-windows-linux/ below:

Creating Python Virtual Environment in Windows and Linux

Creating Python Virtual Environment in Windows and Linux

Last Updated : 17 May, 2025

A Virtual Environment is a Python environment, that is an isolated working copy of Python that allows you to work on a specific project without affecting other projects So basically it is a tool that enables multiple side-by-side installations of Python, one for each project.

Creating a Python virtual environment in Linux Step 1: Ensure Python and pip are installed

On most Linux distributions, Python 3 and pip can be installed via package manager:

sudo apt update
sudo apt install python3 python3-pip python3-ven

Step 2: Create a virtual environment

This creates a folder myenv (you can use any name) containing the isolated Python environment.

python3 -m venv myenv

Step 3: Activate the virtual environment

source myenv/bin/activate

Your shell prompt will change to indicate the active environment.

Step 4: Deactivate the virtual environment

deactivate

Creating Python Virtual Environment in Windows

If python is installed in your system, then pip comes in handy. So simple steps are:

Step 1: Create a virtual environment

Open Command Prompt or PowerShell, navigate to your project folder, and run:

python -m venv myenv

Step 2: Activate the virtual environment

myenv\Scripts\activate

Step 4: Deactivate the virtual environment

Simply run:

deactivate



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4