Running
yum search cm-python3
(the prefix “cm-
” is important) should turn up the Bright Cluster Manager Python 3 package for more recent Bright Cluster Manager software.
A yum install of the package will then place it.
The guide below is a guide for older versions of Bright, and is only useful as a kind of overview now.
(A version that worked with Bright Cluster Manager 6.1 is at https://kb.brightcomputing.com/knowledge-base/how-can-i-install-the-latest-python-in-bright/)
You can install Python 3.x in /cm/shared/apps
and create an
environment module file to select when you want to use it:
Step 1 – Download the source code:
- wget http://python.org/ftp/python/3.3.4/Python-3.3.4.tar.xz
Step 2 – Build Python:- tar xf Python-3.3.4.tar.xz
- cd Python-3.3.4
- ./configure --prefix=/cm/shared/apps/python/3.3.4 --enable-shared
- make && make altinstall
- cd /cm/shared/apps/python/3.3.4/bin && ln -s python3.3 python
Step 3 – Create an environment module file:- mkdir -p /cm/shared/modulefiles/python
- cd /cm/shared/modulefiles/python
– Create a text file e.g. vim 3.3.4 with the following contents:#%Module -*- tcl -*-
##
## modulefile
##
proc ModulesHelp { } {
puts stderr "\tAdds Python 3.3.4 to your environment variables,"
}
module-whatis "adds Adds Pyhton 3.3.4 to your environment variables"
set root /cm/shared/apps/python/3.3.4
prepend-path PATH $root/bin
prepend-path LD_LIBRARY_PATH $root/lib:$root/lib64
Example: Installing a python module (snakemake):module load python/3.3.4
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python3.3 ez_setup.py
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python3.3 -
And install snakemake:easy_install-3.3 snakemake