Locked History Actions

DarkMatterPython

Use Anaconda python on DarkMatter

To use the anaconda python distribution on DarkMatter you need to prepend your PATH environment var with the anaconda version location:

export PATH="/usr/local/share/anaconda/bin:$PATH"

After the install, GalSim failed to load:

import galsim
...
ImportError: /usr/local/share/anaconda/bin/../lib/libm.so.6: version `GLIBC_2.15' not found (required by /usr/local/lib/libfftw3.so.3)

This is a known (but not fixed!?) problem (also here): anaconda ships with its own version of libm that requires an old version 2.15 of libc. Ubuntu 14.04 ships with 2.19 which is backwards compatible but it looks like the anaconda libm requires =2.15 instead of >=2.15 ?

The solution is to rename the offending library so that dependencies on the anaconda libm are now resolved by the system libm:

cd /usr/local/share/anaconda/lib
sudo mkdir save
sudo mv libm.* save/

Note that the boost python library installed in /usr/local/lib is now built against the anaconda python library, so you must use anaconda python to load modules that rely on boost python to call C++ code (GalSim, bashes, ...)

A subtle gotcha for installing packages that are not available under conda is that you need sudo privileges to install under /usr/local/share/anaconda but the sudo command forgets your path, so reverts to the system python. The solution is to sudo bash with anaconda added to the path in ~root/.bashrc. For example (use -H to reset $HOME):

% python setup.py build
% sudo -H bash
# python setup.py install
# exit