These are notes from Introduction to Deep Learning with PyTorch. If you need to access the materials, clone this repository using
$ git clone [email protected]:adelekuzmiakova/deep-learning-pytorch.git
and cd
into it.
A Virtualenv is a tool to keep the dependencies required by different projects in separate places by creating virtual Python environments for them. It solves the “Project X depends on PyTorch version 0.x but Project Y needs 1.x” dilemma and keeps your global site-packages directory clean and manageable.
- Python 3
- Pip 3
$ brew install python3
Pip3 is installed with Python3
To install virtualenv via pip run:
$ pip3 install virtualenv
Creation of virtualenv:
$ virtualenv -p python3.5 [desired-path]
e.g.
$ virtualenv -p python3.5 .env
Activate the virtualenv:
$ source [desired-path]/bin/activate
e.g.
$ source .env/bin/activate
Within the virtualenv you can install project-specific packages:
$ pip3 install -r requirements.txt
When you are done working on your project, deactivate the virtualenv:
$ deactivate