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-08-29 17:23:40 +02:00
|
|
|
Installing required libraries on Mac OS X
|
|
|
|
=========================================
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2013-11-03 18:56:55 +01:00
|
|
|
This is an installation guide for Os X Mountain Lion.
|
|
|
|
It may work for older
|
2013-08-29 17:23:40 +02:00
|
|
|
versions of Mac OS X but previous versions of Mac OS X are not supported.
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2013-08-27 19:17:17 +02:00
|
|
|
NB: The installation of TRIQS under previous versions of OS X requires installing clang (via Xcode).
|
2013-11-03 18:56:55 +01:00
|
|
|
(On Mountain Lion, clang (llvm) replaces gcc as the default C++ compiler).
|
2013-07-17 19:24:07 +02:00
|
|
|
|
|
|
|
We strongly recommend the following installation procedure, which provides a clean way to set up all dependencies, so that all
|
|
|
|
of them are compatible with each other. Only the installation via homebrew is supported for the Mac.
|
|
|
|
|
2013-11-03 18:56:55 +01:00
|
|
|
.. warning::
|
|
|
|
|
|
|
|
Because brew evolve with time, there is no notion of distribution on Mac, like e.g. Ubuntu.
|
|
|
|
So, while the procedure worked at some point, there can be no guarantee that it still does.
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
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: ::
|
|
|
|
|
|
|
|
brew install cmake
|
|
|
|
brew install gfortran
|
|
|
|
brew install --enable-cxx hdf5
|
|
|
|
brew install gsl
|
|
|
|
brew install fftw
|
|
|
|
brew install open-mpi
|
|
|
|
brew install zmq
|
|
|
|
brew install python
|
|
|
|
brew install doxygen
|
2013-08-27 19:17:17 +02:00
|
|
|
|
2013-08-30 20:17:45 +02:00
|
|
|
#brew formula has been repaired. Temporary using our own
|
|
|
|
#until this is back in the master.
|
|
|
|
#When 1.55 is out, the regular brew formula should work again ...
|
|
|
|
### 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 breathe
|
|
|
|
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
|
|
|
|
pip install cython
|
2013-08-31 23:53:58 +02:00
|
|
|
# strangely, cython is not in bin, hence not in the path...
|
|
|
|
pushd /usr/local/bin && ln -s /usr/local/share/python/cython . && popd
|
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: ::
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
NB : you need pyparsing <=1.5.7 since apparently v.2.0 works only for python 3.
|
|
|
|
|
|
|
|
|
2013-08-29 17:23:40 +02:00
|
|
|
Possible issues
|
|
|
|
---------------
|
2013-07-17 19:24:07 +02:00
|
|
|
|
|
|
|
If you encounter the following error: ::
|
|
|
|
|
|
|
|
/usr/local/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
|
|
|
|
|
|
|
|
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``: ::
|
|
|
|
|
|
|
|
CPPFLAGS=-I/usr/X11/include/freetype2/ pip install git+https://github.com/matplotlib/matplotlib.git#egg=matplotlib-dev
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|