filmov
tv
How to Install and Activate Virtual environment on windows for Python Projects

Показать описание
Installing #virtualenv, activating it, installing #python packages and deactivating the environment in #windows:
0:00 Virtualenv Installation
4:13 Creating a Python Environment
6:03 Activating The created Environment
8:10 Installing a Python Package
8:27 Deactivating the Python Environment
Steps:
1. python3 -m pip install virtualenv
alternative method:
python3 -m pip install --user virtualenv
Creating and Activating Your Virtual Environment:
1. cd (change directory to working directory)
e.g cd Desktop/UpcomingProject
2. Create an environment for the project using the command:
python -m venv 'nameOfYourEnvironment'
e.g python -m venv env
(env) is my new environment now)
3. Activating the environment:
'nameOfYourEnvironment'\Scripts\activate
e.g env\Scripts\activate
4. Installing packages on your environment:
example packages; Django Framework, BeautifulSoup &c.
command to use: pip install 'package-name'
e.g pip install django
5. Deactivating the Environment:
We use the 'deactivate' command. Type deactivate to close the env.
e.g deactivate
0:00 Virtualenv Installation
4:13 Creating a Python Environment
6:03 Activating The created Environment
8:10 Installing a Python Package
8:27 Deactivating the Python Environment
Steps:
1. python3 -m pip install virtualenv
alternative method:
python3 -m pip install --user virtualenv
Creating and Activating Your Virtual Environment:
1. cd (change directory to working directory)
e.g cd Desktop/UpcomingProject
2. Create an environment for the project using the command:
python -m venv 'nameOfYourEnvironment'
e.g python -m venv env
(env) is my new environment now)
3. Activating the environment:
'nameOfYourEnvironment'\Scripts\activate
e.g env\Scripts\activate
4. Installing packages on your environment:
example packages; Django Framework, BeautifulSoup &c.
command to use: pip install 'package-name'
e.g pip install django
5. Deactivating the Environment:
We use the 'deactivate' command. Type deactivate to close the env.
e.g deactivate