filmov
tv
What is a Virtual Environment in Python?

Показать описание
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!
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!
Комментарии