% umask 022
% cd /src/util
util% cp /tmp/Python-3.4.3.tar.xz .
util% unxz Python-3.4.3.tar.xz
util% tar -xvf Python-3.4.3.tar
util% cd Python-3.4.3
Python-3.4.3% ./configure --prefix=/util/python-3.4.3 --with-tcltk-includes='-I/util/ActiveTcl/include' --with-tcltk-libs='/util/ActiveTcl/lib/libtcl8.6.so /util/ActiveTcl/lib/libtk8.6.so' --enable-shared
Python-3.4.3% make
Python-3.4.3% sudo make install clean
[install modules]
% sudo env LD_LIBRARY_PATH=/util/python-3.4.3/lib:${LD_LIBRARY_PATH} /util/python-3.4.3/bin/pip3 --trusted-host pypi.python.org install $MODULENAME
where $MODULENAME is:
docutils
sympy
pycrypto
paramiko
pexpect
unidecode
nltk
mpi4py
numpy
cython [takes a long time]
scipy [takes a long time]
pyparsing
pylab
[failures that didn't install with pip]
bzr
matplotlib
pycuda
[reset default links]
Python-3.4.3% cd /util
/util% sudo rm python python3
/util% sudo ln -s python-3.4.3 python
/util% sudo ln -s python-3.4.3 python3
[reset the /util/bin symbolic links]
% cd /util/bin
bin% sudo ln -s ../python-3.4.3/bin/python3.4 python3.4
[reset the /util/lib symbolic links]
% cd /util/lib
lib% sudo ln -s ../python-3.4.3/lib/libpython3.4m.so.1.0 libpython3.4m.so.1.0
lib% sudo ln -s ../python-3.4.3/lib/libpython3.4m.so libpython3.4m.so
lib% sudo ln -s ../python-3.4.3/lib/libpython3.so libpython3.so
lib% ln -s ../python-3.4.3/lib/python3.4/ python3.4
Install optional libraries, as specified by the CSE user community.
We have to build some modules by hand.
% tar -xvf mpi4py-1.2.1.tar
% cd mpi4py-1.2.1
% vi mpi.cfg
Scroll down to the [openmpi] section, set:
mpi_dir = /util/openmpi
% sudo /util/bin/python setup.py build --mpi=openmpi
% sudo /util/bin/python setup.py install
Upgrade numpy and scipy, above.
% gunzip matplotlib-1.4.3.tar.gz
% tar -xvf matplotlib-1.4.3.tar
% cd matplotlib-1.4.3
% sudo env LD_LIBRARY_PATH=/util/python-3.4.3/lib:${LD_LIBRARY_PATH} /util/bin/python setup.py build
% sudo env LD_LIBRARY_PATH=/util/python-3.4.3/lib:${LD_LIBRARY_PATH} /util/bin/python setup.py install
Also needed to:
% cd /util/lib
% sudo ln -s ../ActiveTcl/lib/libtcl8.6.so libtcl8.6.so
% sudo ln -s ../ActiveTcl/lib/libtk8.6.so libtk8.6.so
Verify that /usr/lib64/libpython2.6.so.1.0 exists, or the compiler will not be able to find it. Create a symlink if necessary:
[lethe] lib64% sudo ln -s /util/python/lib/libpython2.6.so.1.0 libpython2.6.so.1.0
% tar -xvf pycuda-0.94rc.tar
% cd pycuda-0.94rc
% ./configure.py --cuda-root=/util/cuda --boost-python-libname=libboost_python --boost-thread-libname=libboost_thread --boost-lib-dir=/util/boost/lib --boost-inc-dir=/util/boost/include
% sudo /util/bin/python setup.py install
[FAIL]
/util/boost/include/boost/type_traits/detail/cv_traits_impl.hpp:38: internal compiler error: in make_rtl_for_nonlocal_decl, at cp/decl.c:5067
- pip is the preferred installer program. Starting with Python 3.4, it is included by default with the Python binary installers.
- easy_install is now included by default.
- We need to configure Python with the ActiveTcl dependency because matplotlib depends on it.
- http://www.python.org/downloads/
- https://docs.python.org/3/installing/
- http://pypi.python.org/pypi/setuptools
- http://www.tkdocs.com/tutorial/install.html
- http://matplotlib.org/