2013-08-31 00:04:09 +02:00
|
|
|
.. index:: install_osx_lion
|
2013-07-17 19:24:07 +02:00
|
|
|
|
|
|
|
.. highlight:: bash
|
|
|
|
|
2013-08-31 00:04:09 +02:00
|
|
|
.. _install_on_osx_lion:
|
|
|
|
|
2013-12-30 22:31:36 +01:00
|
|
|
Installing required libraries on Mac OS X [EXPERIMENTAL]
|
|
|
|
==============================================================
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2013-12-30 22:31:36 +01:00
|
|
|
Disclaimer
|
|
|
|
-------------
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2013-12-30 22:31:36 +01:00
|
|
|
We provide here some instructions to install and use TRIQS on OS X.
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2013-12-30 22:31:36 +01:00
|
|
|
While the installation of TRIQS itself is as straightforward as on Linux systems,
|
|
|
|
the installation of the standard scientific libraries used by TRIQS
|
|
|
|
(mpi, hdf5, boost, fftw, ipython, ....) is not as simple as in e.g. Debian/Ubuntu,
|
|
|
|
where they are packaged with the distribution itself (i.e. "part of the system").
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2013-12-30 22:31:36 +01:00
|
|
|
This general problem of scientific computing on OS X is clearly
|
|
|
|
illustrated by the large number of third-party attempts
|
|
|
|
to provide "easy" installation of scientific libraries :
|
|
|
|
brew, macports, fink, Enthought Python distribution.
|
|
|
|
|
|
|
|
In our experience, none of this solution is perfect, nor complete or stable : they are still
|
|
|
|
very far from the quality and stability of a Linux distribution like Debian/Ubuntu.
|
|
|
|
It *almost* works, but at the end, there are some issues, sometimes severe,
|
|
|
|
in the way scientific librairies are installed.
|
|
|
|
(e.g. currently the default version of mpi and hdf5 installed by brew are in conflict :
|
|
|
|
the simple mpi "Hello World" crashes when linked with hdf5_cpp).
|
|
|
|
|
2014-06-08 21:47:32 +02:00
|
|
|
Moreover, because there is no notion of "distribution"
|
2013-12-30 22:31:36 +01:00
|
|
|
the versions of the libraries are always changing e.g. in brew.
|
|
|
|
As a result, the installation instructions may work on one day, and suddenly stop to work
|
|
|
|
the day after.
|
|
|
|
|
|
|
|
While this has a priori **nothing to do with TRIQS** and its applications, it clearly impacts its installation and usage.
|
|
|
|
We are looking for a more robust solution to this OS X installation mess; **help welcome !**.
|
|
|
|
|
|
|
|
In the following, we describe an installation procedure which worked (at least one day),
|
|
|
|
on 10.8 and 10.9 (at least on the Mac of one of the developer !).
|
2013-11-03 18:56:55 +01:00
|
|
|
|
|
|
|
|
2013-07-17 19:24:07 +02:00
|
|
|
Installation of the dependencies
|
2013-08-29 17:23:40 +02:00
|
|
|
--------------------------------
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2013-12-30 22:31:36 +01:00
|
|
|
We describe an installation procedure which is known to have worked at least one day,
|
|
|
|
on 10.8 and 10.9, (at least on the Mac of one of the developer !).
|
|
|
|
|
2013-07-17 19:24:07 +02:00
|
|
|
1. Install `homebrew <http://mxcl.github.io/homebrew/>`_.
|
|
|
|
|
|
|
|
Run ``brew doctor`` and resolve potential conflicts before continuing.
|
|
|
|
|
|
|
|
2. Install XCode (directly from the Mac store). In Preferences/Downloads, install "Command Line tools".
|
|
|
|
|
|
|
|
3. Install several packages which are needed: ::
|
2013-12-30 22:31:36 +01:00
|
|
|
|
|
|
|
brew tap homebrew/science
|
2013-07-17 19:24:07 +02:00
|
|
|
brew install cmake
|
|
|
|
brew install gfortran
|
2014-06-08 21:47:32 +02:00
|
|
|
brew install hdf5
|
2013-07-17 19:24:07 +02:00
|
|
|
brew install gsl
|
|
|
|
brew install fftw
|
|
|
|
brew install open-mpi
|
|
|
|
brew install zmq
|
|
|
|
brew install python
|
2013-12-30 22:31:36 +01:00
|
|
|
|
2014-06-08 21:47:32 +02:00
|
|
|
#brew formula has been repaired
|
2013-08-30 20:17:45 +02:00
|
|
|
### brew install boost --without-single --with-mpi --with-c++11
|
2013-09-10 14:16:40 +02:00
|
|
|
brew install http://ipht.cea.fr/triqs/formulas/boost.rb --without-single --with-mpi --with-c++11 -v
|
2013-08-30 20:17:45 +02:00
|
|
|
|
2013-07-17 19:24:07 +02:00
|
|
|
5. Install the required python packages: ::
|
|
|
|
|
|
|
|
pip install numpy
|
|
|
|
pip install h5py
|
|
|
|
pip install scipy
|
2013-08-27 19:17:17 +02:00
|
|
|
pip install mpi4py
|
|
|
|
pip install matplotlib
|
2013-11-03 18:56:55 +01:00
|
|
|
pip install sphinxcontrib-doxylink
|
2013-07-17 19:24:07 +02:00
|
|
|
pip install tornado
|
|
|
|
pip install pyzmq
|
2013-08-27 19:17:17 +02:00
|
|
|
pip install jinja2
|
2013-07-17 19:24:07 +02:00
|
|
|
pip install ipython
|
2013-08-27 19:17:17 +02:00
|
|
|
|
2013-07-17 19:24:07 +02:00
|
|
|
6. If you wish to compile the documentation locally, install sphinx, its dependencies and mathjax: ::
|
|
|
|
|
2013-12-30 22:31:36 +01:00
|
|
|
brew install doxygen
|
2013-07-17 19:24:07 +02:00
|
|
|
pip install sphinx
|
|
|
|
easy_install pyparsing==1.5.7
|
2013-09-09 15:52:58 +02:00
|
|
|
git clone https://github.com/mathjax/MathJax.git MathJax
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2014-06-08 21:47:32 +02:00
|
|
|
NB : you need pyparsing <=1.5.7 since apparently v.2.0 works only for python 3. (? still true ?)
|
2013-07-17 19:24:07 +02:00
|
|
|
|
|
|
|
|
2013-08-29 17:23:40 +02:00
|
|
|
Possible issues
|
|
|
|
---------------
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2013-12-30 22:31:36 +01:00
|
|
|
* If you encounter the following error: ::
|
2013-07-17 19:24:07 +02:00
|
|
|
|
|
|
|
/usr/local/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
|
|
|
|
|
2013-12-30 22:31:36 +01:00
|
|
|
in the installation of matplotlib, you need to pass the proper include path. Locate the freetype directory
|
|
|
|
with the header file and pass the include path through ``CPPFLAGS``: ::
|
2013-07-17 19:24:07 +02:00
|
|
|
|
|
|
|
CPPFLAGS=-I/usr/X11/include/freetype2/ pip install git+https://github.com/matplotlib/matplotlib.git#egg=matplotlib-dev
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|