ID #1226

How can I install the latest Python in Bright?

RedHat, SUSE, and similar Linux-based OS distributors provide versions of Python that lag behind the latest upstream. This is normally a good thing, since the distributors provide integration, and carry out testing to make sure it works well with the rest of the OS. However, some admins would like to have the latest Python versions available on their cluster. One reason may be that later versions have some nicer features.
Upgrading to the latest Python outside of what the distributors provide is not supported by the Linux distributors. So, it is possible to run into Python-related issues for which support cannot be provided by the distributors, and also not by us. Bright will of course help out within reason.
That said, upgrade-related issues have not been noticed. So there is a good chance that all works well.


The following steps were tested on a Bright 6.1 installation originally running Python 2.6. The steps are a guide to upgrading and recompiling Bright PythonCM with Python 3.4:


1. Download, extract, build Python 3.4.0:

# wget -c

# tar -xzvf Python-3.4.0.tgz

# cd Python-3.4.0

# ./configure --prefix=/opt/python/3.4.0 --enable-unicode=ucs4 --enable-shared

# make

# make install


2. Download, extract, build boost 1.55.0:

# wget -c

# tar -xjvf boost_1_55_0.tar.bz2

# cd boost_1_55_0

# echo "using python : 3.4 : /opt/python/3.4.0 :

/opt/python/3.4.0/include/python3.4m : /opt/python/3.4.0/lib ;" >> ./tools/build/v2/user-config.jam

# ./ --with-python=/opt/python/3.4.0/bin/python3 --with-python-version=3.4 --with-python-root=/opt/python/3.4.0

# ./b2 --prefix=/opt/boost/1.55.0 --without-mpi --enable-unicode=ucs4 install


3. Extract the attached pythoncm archive and build it

# yumdownloader pythoncm-dist

# rpm2cpio pythoncm-dist-6.1-r20472_cm6.1.x86_64.rpm | cpio -idmv

# tar -xjvf pythoncm-6.1-r20472.tar.bz2

# cd pythoncm-6.1-r20472


# ./ --with-boost=/opt/boost/1.55.0 --with-python-include=/opt/python/3.4.0/include/python3.4m --with-python-lib=/opt/python/3.4.0/lib/



Compiled pythoncm revision: 20472


You have successfully built python

bindings for Bright Cluster Manager


Listing of files



# This is the Bright Computing Python Cluster Manager bindings build script



exec > >(tee

exec 2> >(tee


base=´dirname $0´

if [ "$base" = "." ]; then



echo $base


function on_exit() {

 if [ $? == 0 -a -f "$base/python/" ]; then

   export LD_LIBRARY_PATH="/opt/python/3.4.0/lib:./remotecm"

   echo "import sys" >

   echo "sys.path.insert(0, 'python')" >>

   echo "import pythoncm" >>

   echo "clustermanager = pythoncm.ClusterManager()" >>

   echo "print ('Compiled pythoncm revision: %s' % clustermanager.revision)" >>


   if [ $? == 0 ]; then

     echo "===================================="

     echo "You have successfully built python"

     echo "bindings for Bright Cluster Manager"

     echo "===================================="


     echo "===================================="

     echo "You have compiled pythoncm,"

     echo "but it was unable to execute properly"

     echo "===================================="



   echo "===================================="

   echo "pythoncm build failed!"

   echo "Check out the files:"

   echo ""

   echo ""

   echo "If the problem is not caused by missing"

   echo "packages (see README file) please send"

   echo "a mail to"

   echo "and attach both file"

   echo "===================================="




set -e

trap on_exit EXIT



CPUS=´grep -Eic "^processor" /proc/cpuinfo´

if [ -z "$CPUS" ]; then




# When compiling with a different version of pyhton make sure to also change the python command above


./configure --with-gzip $*

make -j $CPUS

Tags: -

Related entries:

You cannot comment on this entry