Standard commands to create and use a Python virtual environment from the command shell, with the most common cases covered.
✅ Windows (Command Prompt / PowerShell)
1️⃣ Go to your project folder
cd path\to\your\project
2️⃣ Create a virtual environment
python -m venv venv
3️⃣ Activate the virtual environment
venv\Scripts\activate
You should now see:
(venv) C:\path\to\your\project>
4️⃣ Deactivate (when done)
deactivate

Views: 8
Comments are closed.