User Tools

Site Tools


guide:compiling_python_2_7_3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
guide:compiling_python_2_7_3 [2012/04/12 14:23]
hamish created
guide:compiling_python_2_7_3 [2021/12/09 16:42] (current)
Line 1: Line 1:
-test====== Installing Python 2.7.3 from source on the Sun Tsessbe Cluster ====== +Page moved to [[howto:compiling_python_2_7_3|Installing Python from source]].
- +
-Before following this guide read through the README file located in the Python Source Install Folder. Also it recommended to make use of temporary or scratch directory to do all the compilation in (i.e. ~/scratch or /tmp/$USER), as to save disk space in your home directory. This guide assumes GCC 4.6.2 has been installed in your home directory as  in [[guide:compiling_gcc|Compiling GCC from Source]]. Paste the following lines at the end of your ./bashrc file +
-  export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH +
-  export LD_LIBRARY_PATH=$HOME/lib64:$LD_LIBRARY_PATH +
-  export PATH=$HOME/bin:$PATH +
-  export LDFLAGS="-L$HOME/lib64 -L$HOME/lib" +
-  export CPPFLAGS="-I$HOME/include -L$HOME/lib64 -L$HOME/lib" +
-  export CXXFLAGS=$CPPFLAGS +
-  export F77=gfortran +
- +
-log out and in again,  +
-  $  gcc --version +
-  gcc (GCC) 4.6.2 +
-   +
- +
- +
-===== Prerequisites  ===== +
- +
-Before compiling Python, the zlib library needs to installed. +
- +
-  $ cd ~/scratch +
-  $ wget http://zlib.net/zlib-1.2.6.tar.gz +
-  $ tar -xf zlib-1.2.6.tar.gz +
-  $ cd zlib-1.2.6 +
-  $ make +
-Test it! +
-  $ make check +
-Install if all tests passes +
-  $ make install      +
- +
-===== Download Source ===== +
- +
-  $ cd ~/scratch  +
-  $ wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz +
-  $ tar -xf Python-2.7.3.tgz +
-   +
-===== Configuration ===== +
- +
-   $ cd ~/scratch/Python-2.7.3.tgz +
-   $ mkdir BUILD +
-   $ cd BUILD +
-   $ ../configure --prefix=$HOME  +
-   +
-===== Build ===== +
- +
-   $ make +
- +
-If errors occur such as  +
-  * g++: Internal error: Killed (program cc1plus) +
-wait a while and then make again, as the process was killed by the usage limiter which runs on the login node. If nessary try the approach shown in [[guide:compiling_gcc#compiling_gcc|Compiling GCC from Source]]+
- +
-===== Check ===== +
- +
-  $ make test +
- +
-No news is good news: If this test command completes with out an error you know that Python has been compiled successfully. +
- +
-===== Install ===== +
- +
-  $ make install +
-   +
-Add the following to the end of your .bashrc file +
- +
-  # for Octave 3.4.3 installed in $HOME +
-  export LD_LIBRARY_PATH=$HOME/lib/octave/3.4.3:$LD_LIBRARY_PATH +
-   +
-Log in and out, then  +
-  $ octave --version +
-  GNU Octave, version 3.4.3 +
-  Copyright (C) 2011 John W. Eaton and others.+
/app/dokuwiki/data/attic/guide/compiling_python_2_7_3.1334233405.txt.gz · Last modified: 2021/12/09 16:42 (external edit)