TGViewer
Python Projects & Free Books Python Projects & Free Books @pythonfreebootcamp · 40.6K subscribers
Post #623 2.09K
Creating Virtual Environment for Python

» Download Python
First you need python installed in your local machine to create virtual environment.
Download Python from Here



» Steps to create '.env' folder (virtual environment for python)
1. Navigate to the folder where you want to make your project
Example:

cd D:/code/


2. Open terminal (local terminal, command prompt, or vs code terminal) in that folder

3. Now, use these commands
python --version # Type this and hit enter to verify the python version


# Now use these commands
python -m venv .env


4. Your virtual environment is created in that folder, now activate this virtual environment using this command.

Command for 'Command Prompt':
.\env\Scripts\activate


Command for 'Powershell':
.\env\Scripts\Activate.ps1


Command for Git Bash or WSL:
source \.env\bin\activate


If Powershell gives you error like File cannot be loaded because running scripts is disabled then use this command!
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass


5. Congratulations🎊 Your virtual environment activated now make your project


Happy Coding 👨‍💻
  • 👍 4
More from @pythonfreebootcamp
  1. Oct 2, 2026Data Analytics A-Z
  2. Sep 25, 2026🎯 GigaChat 3.5 Reasoning: 5 Key Features 1️⃣ Advanced Reasoning: Explores multiple step-b…
  3. Sep 19, 2026Let’s dive into our first mini project using Python: Project 1: Number Guessing Game 🎯 Go…
  4. Sep 14, 2026Learn AI for Free in 2026👇 1/ Kaggle Learn: https://www.kaggle.com/learn 2/ Anthropic Lea…
  5. Aug 7, 2026Roadmap to become a data analyst 1. Foundation Skills: •Strengthen Mathematics: Focus on s…
  6. Jul 31, 2026🐍 Python Roadmap 1️⃣ Basics: 📝📜 Syntax, Variables, Data Types 2️⃣ Control Flow: 🔄🤖 If…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →