提交 a304ba62 authored 作者: David Warde-Farley's avatar David Warde-Farley

Merge pull request #743 from nouiz/import

Import and doc.
...@@ -138,6 +138,7 @@ Community ...@@ -138,6 +138,7 @@ Community
internal/index internal/index
examples/index examples/index
proposals/index proposals/index
acknowledgement
LICENSE LICENSE
......
...@@ -164,7 +164,7 @@ directory; see the `virtualenv documentation`_ for details. ...@@ -164,7 +164,7 @@ directory; see the `virtualenv documentation`_ for details.
.. _virtualenv documentation: http://virtualenv.openplans.org/ .. _virtualenv documentation: http://virtualenv.openplans.org/
.. _pip: http://pypi.python.org/pypi/pip .. _pip: http://pypi.python.org/pypi/pip
.. _install_bleeding_edge: .. _updating:
Updating Theano Updating Theano
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
...@@ -198,6 +198,7 @@ the Theano cache like this: ...@@ -198,6 +198,7 @@ the Theano cache like this:
theano-cache clear theano-cache clear
.. _install_bleeding_edge:
Bleeding-edge install instructions Bleeding-edge install instructions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -479,15 +480,67 @@ everything is working properly. ...@@ -479,15 +480,67 @@ everything is working properly.
(`libdoc_config`). (`libdoc_config`).
.. _Graphviz: http://www.graphviz.org/Download_windows.php
MacOS MacOS
----- -----
There are various ways to install Theano dependencies on a Mac. There are various ways to install Theano dependencies on a Mac.
Here we describe the process in details using MacPorts, but if you did Here we describe the process in detail with EPD or with MacPorts, but if you did
it differently and it worked, please let us know the details on the it differently and it worked, please let us know the details on the
`theano-users`_ mailing-list, so that we can add alternate instructions `theano-users`_ mailing-list, so that we can add alternate instructions
here. here.
In academia: Enthought Python Distribution (EPD)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you are working in academia, the easiest way to install most of the
dependencies is to install
`Enthought Python Distribution (EPD) <http://enthought.com/products/epd.php>`_.
If you are affiliated with a university (as student or employee), you can
download the installer for free.
EPD installation includes in particular Python (and the development headers),
numpy, scipy, nose, sphinx, easy_install, pydot (but *not* `Graphviz`_, which is
necessary for it to work) and the MKL implementation of blas. The Mac OS and
Linux version do not include g++.
pip is not included in EPD. After the installation of EPD,
you can simply install it with::
.. code-block:: bash
$ sudo easy_install pip
Then in a terminal excute this command to install the lastest Theano release:
.. code-block:: bash
$ sudo pip install Theano
If you want the bleeding edge version, `download
and install git <http://git-scm.com/downloads>`_. Then in a
terminal excute this command:
.. code-block:: bash
$ sudo pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
See the section `install_bleeding_edge`_ for more
information on the bleading edge version.
Then you must install g++. You can do this by installing XCode. See the first bullet in the :ref:`macports` section.
.. note::
If you use the trunk or version 0.6 or later of Theano, we try to
automaticaly link with the EPD blas version. Due to Mac OS
peculiarities, we need a user intervention to do it. We detect
if the user did the modification and if not, we tell him how todo
it.
.. _macports:
MacPorts MacPorts
~~~~~~~~ ~~~~~~~~
...@@ -654,8 +707,8 @@ In academia: EPD ...@@ -654,8 +707,8 @@ In academia: EPD
################ ################
If you are working in academia, the easiest way to install most of the If you are working in academia, the easiest way to install most of the
dependencies is to install `Enthought Python Distribution (EPD) <epd>`_. dependencies is to install `Enthought Python Distribution (EPD) <http://enthought.com/products/epd.php>`_.
If you are affiliated to a university (as student or employee), you can If you are affiliated with a university (as student or employee), you can
download the installation for free. download the installation for free.
EPD installation includes in particular Python (and the development headers), EPD installation includes in particular Python (and the development headers),
...@@ -687,8 +740,6 @@ pip is not included in EPD, but you can simply install it with:: ...@@ -687,8 +740,6 @@ pip is not included in EPD, but you can simply install it with::
easy_install pip easy_install pip
.. _epd: http://enthought.com/products/epd.php
.. _Graphviz: http://www.graphviz.org/Download_windows.php
Alternative: Python(x,y) Alternative: Python(x,y)
######################## ########################
......
...@@ -138,8 +138,7 @@ except OSError: ...@@ -138,8 +138,7 @@ except OSError:
AddConfigVar('linker', AddConfigVar('linker',
("Default linker used if the theano flags mode is Mode " ("Default linker used if the theano flags mode is Mode "
"or ProfileMode"), "or ProfileMode"),
EnumStr('py', 'c|py', 'c', 'c|py_nogc', 'c&py', EnumStr('py', 'vm', 'vm_nogc'),
'vm', 'cvm', 'vm_nogc', 'cvm_nogc'),
in_c_key=False) in_c_key=False)
_logger.warning('g++ not detected ! Theano will be unable to execute ' _logger.warning('g++ not detected ! Theano will be unable to execute '
'optimized C-implementations (for both CPU and GPU) and will ' 'optimized C-implementations (for both CPU and GPU) and will '
......
...@@ -449,6 +449,14 @@ try: ...@@ -449,6 +449,14 @@ try:
# skip VM.__init__ # skip VM.__init__
except ImportError: except ImportError:
pass pass
except OSError:
#OSError happen when g++ is not installed. In that case, we
#alread changed the default linker to something else then CVM.
#Currently this is the py linker.
#Here we assert that the default linker is not cvm.
assert not [x for x in theano.configparser._config_var_list
if x.fullname == 'linker'][0].default.startswith('cvm')
pass
class VM_Linker(link.LocalLinker): class VM_Linker(link.LocalLinker):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论