Theano

From FarmShare

Revision as of 16:09, 22 April 2016 by Chekh (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Alex test install Theano 0.8.2 (non-GPU) on Python 3.x on my local Ubuntu 15.10 machine.

Needs packages:

 libatlas-base-dev
 python3-scipy
 python3-numpy
 python3.4-dev
 python3.4-venv

Now start up an new Python 3 virtualenv, call it 'env1'.

 python3 -m venv env1
 source env1/bin/activate #activate your venv
 which pip #check your pip is from your venv
 pip install --user Theano

...errors out on something about numpy/scipy problem...

Let's try again without a virtualenv, so hopefully we pick up the OS install of scipy/numpy:

 sudo aptitude install python3-pip
 python3 -m pip install --user Theano

eventually:

 Successfully installed Theano numpy scipy six
 Cleaning up...

then:

chekh@srn-chek:~$ python3
Python 3.4.3+ (default, Oct 14 2015, 16:03:50) 
[GCC 5.2.1 20151010] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Theano
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'Theano'
>>> import theano
>>> 
>>> print(theano.__version__)
0.8.2

rye02

Let's try the same thing on rye02, Ubuntu 14.04.4 with cuda 7.5

These are already installed:

 python3.4-dev
 python3.4-venv
 libatlas-base-dev
 python3-scipy
 python3-numpy

So it should just be:

 module load cuda
 python3 -m pip install --user Theano

Eventually:

[chekh@rye02.stanford.edu] ~ [0] 
$ module list

Currently Loaded Modules:
  1) cuda/7.5
[chekh@rye02.stanford.edu] ~ [0] 
$   python3 -m pip install --user Theano
Requirement already satisfied (use --upgrade to upgrade): Theano in ./.local/lib/python3.4/site-packages
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.7.1 in ./.local/lib/python3.4/site-packages (from Theano)
Requirement already satisfied (use --upgrade to upgrade): scipy>=0.11 in /usr/lib/python3/dist-packages (from Theano)
Requirement already satisfied (use --upgrade to upgrade): six>=1.9.0 in /usr/lib/python3/dist-packages (from Theano)
Cleaning up...
[chekh@rye02.stanford.edu] ~ [0] 
$ python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import theano
>>> print(theano.__version__)
0.8.2
>>> 
Personal tools
Toolbox
LANGUAGES