Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To install the virtual environment library, execute the following command in your command line

...

Creating a Virtual Environment

  • Navigate to the directory where you want to store all of the files needed by your virtual environment using the cd [Directory name] command

...

  • execute the python -m venv [Directory] where [Directory] should be replaced with what you want to call the folder. In most cases, people simply call it venv

...

Notice, that after you execute this command, you will find a new folder in the directory you executed the command in

...

Activating a Virtual Environment

Activate the virtual environment

  • For osx/linux: source [Directory]/bin/activate

  • For windows: [Directory]\Scripts\activate

...

The small brackets before the command prompt (venv) serve as confirmation that it worked

Deactivating a Virtual Environment

Run the following command

...