Python Virtual Environment

keerthi raja Pkeerthi raja P
1 min read

why virtual environment?

→ Each project demands different version of dependencies (libraries, packages, etc.), So the purpose of virtual environment is to isolate each dependencies for each projects.

→ So dependencies will not installed globally that will not affect other projects on the same machine.

→ Open up your terminal and follow up.

To check python version ?

→ python --version

How to Create virtual environment?

→python -m venv eneviroment

How to Activate virtual environment?

→ .\enviroment\Scripts\activate

(Dot represent current directory)

How to Deactivate virtual environment?

→ Deactivate

This is the way we create virtual environment in python.

0
Subscribe to my newsletter

Read articles from keerthi raja P directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

keerthi raja P
keerthi raja P

Hi, friends. This is keerthi raja what I post here are my learnings. Thank you.