Skip to content

Latest commit

 

History

History
30 lines (27 loc) · 927 Bytes

virtual_environments.md

File metadata and controls

30 lines (27 loc) · 927 Bytes

Virtual environments

Useful resources:

See also Conda pages.

Steps for creating and using a virtual environment:

  1. Create a directory in which your virtual environment is going to be stored, e.g., test_env_dir
> mkdir test_env_dir
> cd test_env_dir
  1. Inside that directory, create a new virtual environment using the virtualenv package
> python -m virtualenv test_env
  1. Activate this new environment
> test_env/Scripts/activate
  1. Notice now that [test_env] is at the start of the command line indicating you are in the new environment and can load and install Python packages as required.
(test_env) >
  1. To exit the virtual environment type:
(test_env) > deactivate