Windows Virtual Environment in Python

Open the terminal and go to your python project's root directory and type:

python -m venv virtual_environment_name


Go to the file Scripts that are added by default with venv:
cd .\virtual_environment_name\Scripts

Now activate the environment by using the command:

source activate



This activates the virtual environment, now whatever package you install with pip, will stay inside this virtual environment.

You can deactivate the env later on using:

deactivate


That was it :)


Comments

Post a Comment

Popular posts from this blog

Setup for Web Scrapping Project