How To Create Python Virtual Environment?

Install Python

Open a terminal or command prompt

Navigate to your project folder

Create a virtual environment: `python -m venv venv`

Activate on Windows: `venvScriptsactivate`

Activate on macOS/Linux: `source venv/bin/activate`

Verify the environment is active

Install packages with `pip install package_name`

Deactivate with `deactivate`

Suggested for You

Trending Today