Installing Python and Boost from source to work with ESyS-Particle
- Keywords:
- Python Boost ESyS-Particle
- Last updated by:
- Vince Boros
These notes are for installing Boost 1.45.0 and Python 2.7.1 under $HOME, for which you need the $HOME/bin/, $HOME/lib/ and $HOME/include/ folders. They assume that the Boost and Python builds are under $HOME/boost_1_45_0/ and $HOME/Python-
1/ Remove the existing ESyS-Particle installation and build files:
> cd $HOME/esys-
> make uninstall
> make distclean
2/ Remove the existing installed Boost include and library files:
> rm -rf $HOME/include/
3/ Remove the existing Boost build:
> cd $HOME/boost_1_45_0/
> ./bjam --clean
or
> rm -rf bin.v2/
4/ Remove the existing Python build:
> cd $HOME/Python-2.7.1/
> make distclean
5/ Add the binary and library paths to PATH, LD_LIBRARY_PATH and LIBRARY_PATH for detecting the Python binary and library and the Boost libraries (if not already added):
> export PATH=$HOME/
> export LD_LIBRARY_
> export LIBRARY_
Add these also to the end of $HOME/.bashrc.
6/ Build and install Python:
> cd $HOME/Python-2.7.1/
> ./configure --prefix=$HOME --enable-shared
> make
> make altinstall
The "--enable-shared" option allows installation of the Python library as a shared object. "make altinstall" allows multiple versions of Python to coexist.
7/ Link to Python 2.7, and check the link:
> ln -sf $HOME/bin/python2.7 $HOME/bin/python
> ln -sf $HOME/bin/
> ls -l `which python`
8/ Build and install Boost:
> cd $HOME/boost_1_45_0/
> ./bootstrap.sh --prefix=$HOME --with-
> ./bjam link=shared install
In the ./bootstrap.sh output, check that the correct Python version (2.7) and the correct Python path ($HOME) were detected.
9/ When configuring ESyS-Particle, add the "--with-