DEV Community

Cover image for How to create and Activate the Virtual Environment for Python3 project.
Shrikant Dhayje
Shrikant Dhayje

Posted on • Edited on • Originally published at codewithshriekdj.netlify.app

155

How to create and Activate the Virtual Environment for Python3 project.

In this post I will try to share how you can start to create a project with virtual environment for Python 3.

Get An Code Editor or
IDE, I will suggest you to use VS Code because it's good for beginners.

Install Python 3 Programming Language.

Create a Virtual Environment

Open Any Terminal and run below command.

python -m venv venv
Enter fullscreen mode Exit fullscreen mode

Activate the Virtual Environment.

For Linux Based OS Or Mac-OS.

source venv/bin/activate
Enter fullscreen mode Exit fullscreen mode

For Windows With CMD.

.\venv\Scripts\activate.bat
Enter fullscreen mode Exit fullscreen mode

For Windows With Power shell.

.\venv\Scripts\activate.ps1
Enter fullscreen mode Exit fullscreen mode

For Windows With Unix Like Shells For Example Git Bash CLI.

source venv/Scripts/activate
Enter fullscreen mode Exit fullscreen mode

if any issue occurred while activating virtual environment on windows then go to below post.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs