In preparation for the lecture given on Thursday, January 22, 2015, those who would like to follow along should install Pylearn2 on their machine. Complete installation instructions can be found on Pylearn2’s online documentation.
We will cover how to install Pylearn2 on a machine which already meets the requirements. For information on how to install prerequisites, refer to your platform-specific documentation.
- Theano (bleeding-edge installation) and its dependencies
- PIL (for some image-related functionalities
- setuptools or distribute
These instructions will work on a Linux or Mac OS machine when typed in a bash shell. You may need to adapt the commands to your environment.
- Change directory to where you’d like the Pylearn2 codebase to reside (the directory you chose for your Theano installation is not a bad idea).
git clone git://github.com/lisa-lab/pylearn2.git
- Change directory inside the Pylearn2 directory and type
python setup.py develop --user
This will ensure that the Pylearn2 repository you just checked out will be found by the Python interpreter. Every change in the Pylearn2 repository is now automatically present when you import the pylearn2 module without you needing to reinstall anything. The command “installs” Pylearn2 locally; if you’d prefer to have a global installation, remove the –user flag (some sudo’ing legwork may be required in that case).
- To confirm that everything works fine, make sure you’re outside of the Pylearn2 directory, launch a Python interpreter and type
If you see no error, the installation was successful!
Keeping things up to date
Pylearn2 is regularly updated. In order to get the latest changes, simply run
git pull origin master
inside the Pylearn2 directory.