提交 35d52bda authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Update installation instruction for Mac.

上级 4e91569d
......@@ -525,44 +525,33 @@ everything is working properly.
MacOS
-----
There are various ways to install Theano dependencies on a Mac.
Here we describe the process in detail with EPD, Anaconda or with MacPorts, but if you did
it differently and it worked, please let us know the details on the
`theano-users`_ mailing-list, so that we can add alternate instructions
here.
There are various ways to install Theano dependencies on a Mac. Here
we describe the process in detail with Canopy, Anaconda or Homebrew, but
if you did it differently and it worked, please let us know the
details on the `theano-users`_ mailing-list, so that we can add
alternate instructions here.
In academia: Enthought Python Distribution (EPD)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In academia: Enthought Canopy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
`Canopy <http://enthought.com/products/canopy/>`_.
If you are affiliated with a university (as student or employee), you
can download the installer for free.
$ sudo easy_install pip
The Canopy installation includes in particular Python (and the
development headers), NumPy, SciPy, nose, sphinx, pip, pydot
(but *not* `Graphviz`_, which is necessary for it to work) and the MKL
implementation of blas.
Then in a terminal execute this command to install the latest Theano release:
To install the latest Theano release execute this in a terminal:
.. 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
......@@ -570,18 +559,19 @@ terminal excute this command:
See the section `install_bleeding_edge`_ for more
information on the bleeding edge version.
Then you must install g++. You can do this by installing XCode. See the first bullet in the :ref:`macports` section.
Then you must install the compiler. See :ref:`compiler_osx` below.
.. note::
If you use the trunk or version 0.6 or later of Theano, we try to
automatically 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 to do
it.
If you use version 0.6 or later of Theano, we try to automatically
link with the Canopy blas version. Due to Mac OS peculiarities,
this requires user intervention. We detect if the manipulation was
done or not and give an error message explaining what to do in case
it hasn't been done.
Anaconda 1.5
~~~~~~~~~~~~
Anaconda
~~~~~~~~
An easy way to install most of the dependencies is to install
`Anaconda <http://continuum.io/downloads.html>`_. There is a free
......@@ -590,9 +580,9 @@ Optimizations`` product (free for academic, ~30$ otherwise) Theano
will also be optimized as we will reuse the faster BLAS version
automatically.
Anaconda installation includes in particular Python (and the development headers),
NumPy, SciPy, nose, sphinx, pip, and a acceptable BLAS version. The Mac OS and
Linux version do not include g++.
The Anaconda installation includes in particular Python (and the
development headers), NumPy, SciPy, nose, sphinx, pip, and a
acceptable BLAS version.
After installing Anaconda, in a terminal execute this command to
install the latest Theano release:
......@@ -607,9 +597,7 @@ To install the missing Theano optional dependency (pydot):
$ conda install pydot
If you want the bleeding edge version, `download
and install git <http://git-scm.com/downloads>`_. Then in a
terminal execute this command:
If you want the bleeding edge version instead execute this command:
.. code-block:: bash
......@@ -618,17 +606,53 @@ terminal execute this command:
See the section `install_bleeding_edge`_ for more
information on the bleeding edge version.
Then you must install g++. You can do this by installing XCode. See the first bullet in the :ref:`macports` section.
Then you must install the compiler. See :ref:`compiler_osx` below.
.. note::
If you use the trunk or a version after 0.6rc3 of Theano, we try to
automatically link with the python library. 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 to do
it.
If you use version 0.6 or later of Theano, we try to automatically
link with the python library. Due to Mac OS peculiarities, this
requires user intervention. We detect if the user did the
modification and if not, we tell him how to do it.
.. _compiler_osx:
Installing the compiler
~~~~~~~~~~~~~~~~~~~~~~~
Theano officially supports only clang on OS X. This can be installed
by getting XCode from the App Store and running it once to install the
command-line tools.
If you still want to use g++ you can do so by setting its full path in
the theano config flag `gxx`. Note that any bug reports on Mac using
g++ will be ignored unless it can be reproduced with clang.
Homebrew
~~~~~~~~
Install python with homebrew:
.. code-block:: bash
$ brew install python # or python3 if you prefer
This will install pip. Then use pip to install numpy, scipy:
.. code-block:: bash
$ pip install numpy scipy
If you want to use openblas instead of Accelerate, you have to install
numpy and scipy with hombrew:
.. code-block:: bash
$ brew tap homebrew/python
$ brew install numpy --with-openblas
$ brew install scipy --with-openblas
.. _macports:
MacPorts
~~~~~~~~
......@@ -723,14 +747,6 @@ Theano dependencies is easy, but be aware that it will take a long time
$ python -c "import theano; theano.test()"
Homebrew
~~~~~~~~
There are some `instructions
<https://github.com/samueljohn/homebrew-python>`__ by Samuel John on how to install
Theano dependencies with Homebrew instead of MacPort.
.. _gpu_macos:
Using the GPU
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论