What is a Virtual Environment in Python?

preview_player
Показать описание
In this video you will learn all about virtual environments in Python. I include commands for Mac, Windows, and Linux. I also cover venv verses virtualenv.
Why use them
What are they
How to use them
When to use them

I may earn commission if you purchase from the links below:

TIMESTAMPS and COMMANDS
0:00 Intro
0:14 Why use a virtual environment?
0:59 What is a virtual environment?

Check python version with python -V
Make a virtual environment: python -m venv env
If you have Python older than 3.3 run: python -m pip install virtualenv
then make the virtual environment: python -m virtualenv env
Look at your site packages: pip list

3:55 Activate your virtual environment
Windows: .\env\Scripts\activate
Mac/Linux: source env/bin/activate
You should see "(env)" at the start of your command line
Do "pip list" to verify your virtual environment is working

5:25 Transferring environments
Look at "pip freeze"
(sorry youtube doesn't let me do the greater than symbol in the description)
Make your new environment

7:55 virtualenv verses venv

8:20 Recap

I hope this helped!
Рекомендации по теме
Комментарии
Автор

Excellent Python Virtual Environment instruction video. Thanks.

qzorn
Автор

HI, keep the videos coming, so clear and precise, love your work.

vcimpressions
Автор

first video i found that actually explained the purpose of virtual environments. thank you!

trkster
Автор

You're very underrated! You always make videos that are to the point and very detailed and well explained. You will surely succeed if you keep going! All the best man! I love all your videos thank you so much for your content.

ps: can you please make a video on how to play music on a rpi4 alexa and how to make enable the wake word activation

jaskeeratsingh
Автор

Thank you for this video. Simple explanation and cleared the concept of a virtual environment.

souravbarua
Автор

your video is awesome!!! fully respect from Taiwan, Thank you~~

ccyang-taiwan
Автор

hey, Can you make a tutorial for real-time text to speech conversion using raspberry pi?

kushalbardia
Автор

Beautiful video, bro… thank you, I was stupid, now I am not stupid. SUB

autohrap
Автор

Hello Sam. how to contact you for a private class in zoom? Thank you.

rubenvelasquez
Автор

@Sam Westby Tech Will the requirement.txt file be in same folder/directory where the env2 is install for env2 to copy/install the packages (in requirement.txt) in env1?

gloriouswingsresearch
Автор

Nice
Can u make video about facemask detection project with raspberry pi? Thank you

tuvsheecs
Автор

Amazimg man!
I wanted to ask you, can you make a toturial which explain how to install mediapipe opencv and tensorFlow to ubunto?
And one more thing, if I install ubunto to my rpi4, it will work the same way?
Thank you so much

avivkarbassi
Автор

Hi Sir, I'm an engineering student and I'm currently working on my final project which includes MediaPipe Tensorflow and OpenCV, I can not download these three libraries to my Raspberry Pi4 with a Python version of 3.9.2 and I'm desperate for a solution please please I owe your help sir

avivkarbassi
Автор

sam....I'm doing a gender recognition project I have got output for the it's working fine on my pc but if I implement the same in raspberry frame rate is very slow (6 sec/frame ) please help me with this

harikrishnasamy