Try this way to create Python Virtual Environment in folder and on system | Step by Step DEMO

preview_player
Показать описание
Steps to create a Python virtual environment in a Project Folder
00:00 Introduction

00:35 What is a Virtual Environment

04:26 Benefits of a virtual environment

04:52 Step 1 - Python must be installed on the system python --version pip --version

06:09 Step 2 - Create a new folder, Open cmd prompt or terminal and goto the location of folder

08:03 Step 3 - Create a virtual environment by running the command python -m venv myenv
This will create a new directory "myenv" in project folder, which will contain the virtual environment

09:58 Step 4 - Activate the virtual environment by running the command myenv/bin/activate (Linux/Mac)
myenv\Scripts\activate (Windows)
deactivate (disconnect virtual env)

12:27 Step 5 - Once the virtual environment is activated, it’s name will be visible on the terminal (myenv)

12:49 Step 6 - We can install the packages in the project by running the command pip install package_name

It's a good practice to create a virtual environment for each project to keep the dependencies isolated and avoid conflicts

Steps to create a Python virtual environment on the system

14:25 Step 1 - Run commands:
pip install virtualenv
pip install virtualenvwrapper-win

16:36 Step 2 - On cmd goto folder where you want to create project

16:56 Step 3 - Create a virtual environment using command mkvirtualenv <environment-name>
lsvirtualenv (see list of virtual env)
workon myenv (connect and activate)
deactivate (disconnect virtual env)

18:49 Step 4 - To bind our virtualenv with current working directory
setprojectdir .

21:50 Can check env and python details using - which python or where python

#Python #VirtualEnv

▬▬▬▬▬▬▬

Every Like & Subscription gives me great motivation to keep working for you
You can support my mission for education by sharing this knowledge and helping as many people as you can

If my work has helped you, consider helping any animal near you, in any way you can

Never Stop Learning
Raghav Pal

▬▬▬▬▬▬▬▬ USEFUL LINKS ▬▬▬▬▬▬▬▬▬

▬▬ CI | CD | DEVOPS ▬▬

▬▬ UI TESTING ▬▬

▬▬ API TESTING ▬▬

▬▬ MOBILE TESTING ▬▬

▬▬ PERFORMANCE TESTING ▬▬

▬▬ SOURCE CODE MANAGEMENT ▬▬

▬▬ IDE ▬▬

▬▬ PROGRAMMING ▬▬

▬▬ BUILD TOOLS ▬▬

▬▬ CLOUD SERVICES ▬▬

▬▬ DATA FORMATS ▬▬

▬▬ OTHERS ▬▬


Рекомендации по теме
Комментарии
Автор

Prefer your way of explaining both on Windows and Mac, giving differences which helped to skip many troubles that I have. Would say that finally after a few months found a clear tutorial on how to start a virtual env and fully understand what I did.
Thank you!

FlorentDemelezi
Автор

Wow, this is invaluable! Thank you, Raghav! I was aware of this concept, but it never crossed my mind. With my sample/tinker/test/sandbox projects growing like 100^7 yottabyte (oke, maybe a little bit exaggerated), managing countless packages, libraries, and whatnot became overwhelming. This way of isolation truly turned things around for me and my little storage friends.

BigBrainHacks
Автор

WOW! Finally, someone who can teach, thank you!

othoapproto
Автор

thnk you so much for the clear and easy to follow tutorial. i was actually struggling with this. thank you again!🙏

fadhlul
Автор

U r the saviour i was stuck here for so longg!!!

shikharachhadia
Автор

Thanks for your video help to learn more easily

SatishvelkumarNadar
Автор

Hi Raghav....Can u please make a video explaining GIT branching strategy and Feature Branching strategy ? Please do it... when u explains it will be more clear to people like me. Thank you !!!

sriramnavin
Автор

Can you please let me know, how to make virtual environment to use particular python version?. Secondly if we already created a virtual environment & need to switch the python version in the middle of the development?

PradeepG-ni
Автор

Hi Sir,
Can you please do a tutorial on UTAM for selenium Java for Salesforce applications. It will be really helpful

UrsTrulybSC
Автор

Hi sir .in upcoming days will Ai and Ml replace testing jobs ? Can we stay in the same testing domain in future also ? Or do i need to switch to upcomming technologies like AI and ml ? . kindly reply for this Sir ...

sjohn
Автор

Not able install the QR code module showing module is missing same with tkinder also can you install in python

SatishvelkumarNadar
Автор

How do you check if a venv is already created? if it is created how do you check if it is activated with cmd or python script?

ajayjoseph
Автор

I have a question: I want to develop my code using my home folder as the development area. i develop using windows. is there a way to have the project folder (and the venv folder) in a subfolder of my home folder, on the network? The folder is not shared with anyone else, but i want to access it both from the office and from home, via vpn. Any suggestions?

MarcoGuardigli
Автор

Please give me this details for mac also

arpithajagdish