.. include:: css.inc

.. _updating:

Updating Theano
===============

Follow one of these three sections depending on how you installed Theano.

You should update frequently, bugs are fixed on a very regular basis, and features are
added even more frequently!

Stable Installation
-------------------

The following command will update only Theano:

.. raw:: html

    <pre><span class="red">&#60;sudo&#62;</span> pip install <span class="blue">&#60;--user&#62;</span> <span class="pink">&#60;--no-deps&#62;</span> theano</pre>

- Use :red:`sudo` for a root installation.

- Use :blue:`user` for a user installation without admin rights. It will install Theano in your local site-packages.

- Use :pink:`no-deps` when you don't want the dependencies of Theano to not be installed through pip. This is important when they have already been installed as system packages.

.. warning::

    If you installed NumPy/SciPy with yum/apt-get, updating NumPy/SciPy
    with pip/easy_install is not always a good idea. This can make Theano
    crash due to problems with BLAS. The versions of
    NumPy/SciPy in the distribution are sometimes linked against faster
    versions of BLAS. Installing NumPy/SciPy with
    yum/apt-get/pip/easy_install won't install the development package
    needed to recompile it with the fast version.
    To fix a possible crash, you can clear
    the Theano cache like this:

    .. code-block:: bash

       theano-cache clear

Bleeding-Edge Installation
--------------------------

The following command will update your bleeding-edge version of Theano

.. raw:: html

    <div style="width:100%"><pre><span class="red">&#60;sudo&#62;</span> pip install <span class="blue">&#60;--user&#62;</span> <span class="pink">&#60;--no-deps&#62;</span> git+https://github.com/Theano/Theano.git#egg=Theano</pre></div>

- Use :red:`sudo` for a root installation.

- Use :blue:`user` for a user installation without admin rights. It will install Theano in your local site-packages.

- Use :pink:`no-deps` when you don't want the dependencies of Theano to not be installed through pip. This is important when they have already been installed as system packages.

.. warning::

    If you installed NumPy/SciPy with yum/apt-get, updating NumPy/SciPy
    with pip/easy_install is not always a good idea. This can make Theano
    crash due to problems with BLAS. The versions of
    NumPy/SciPy in the distribution are sometimes linked against faster
    versions of BLAS. Installing NumPy/SciPy with
    yum/apt-get/pip/easy_install won't install the development package
    needed to recompile it with the fast version.
    To fix a possible crash, you can clear
    the Theano cache like this:

    .. code-block:: bash

       theano-cache clear

Developer Installation
----------------------

To update your library to the latest revision, change directory (``cd``)
to your ``Theano`` folder and execute the following command:

.. warning::

    The following assumes you have knowledge of git and know how to do a rebase.

.. code-block:: bash

    git pull --rebase
