Useful resources:
- https://packaging.python.org/tutorials/installing-packages/
- https://www.youtube.com/watch?v=N5vscPTWKOk
See also Conda pages.
Steps for creating and using a virtual environment:
- 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
- Inside that directory, create a new virtual environment using the
virtualenv
package
> python -m virtualenv test_env
- Activate this new environment
> test_env/Scripts/activate
- 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) >
- To exit the virtual environment type:
(test_env) > deactivate