You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Download Python

http://www.python.org/download/*

  • Create a directory such as rh9_gcc32 (or cd into the directory corresponding to OS and gcc version for which you want to install python, such as rhel4_gcc34 )
  • Make a directory, whose name is the version of the python (e.g., mkdir 2.5.1)
  • Now cd into that directory and create another named, gcc<version>,
    • Where <version> is the version of the gcc compiler (e.g., mkdir gcc33)
  • Extract files from download (_e.g., tar -zxvf Python-2.5.1.tgz_)
  • Run
    • ./configure --prefix=<Installation Location>
      •  Where <Installation Location> is the full path to *<OS_gccVersion>/<python version>/gcc<compiler version>*
      • E.g., ./configure --prefix=/afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/2.5.1/gcc33*

Do a Standard Build 

  • Run
    1. make
    2. make install

Do Custom Build Python against an arbitrary version of tcl/tk

After running 'configure,' in the same directory, there will be a file created in the Modules directory, named "Setup:" Modules/Setup. 

  1. Edit the file, "Modules/Setup"
    • There will be 4 relevant lines in this file that you have to edit.  They look like this:
    • # *** Always uncomment this (leave the leading underscore in!)*:
       __tkinter _tkinter.c tkappinit.c -DWITH_APPINIT {color}
      # ***
      {*}Uncomment and edit to reflect where your Tcl/Tk libraries are{*}:
             -L/usr/lib {}
      # *** {*}Uncomment and edit to reflect where your Tcl/Tk headers are{*}:
             -I/usr/include {}
      # *** Uncomment and edit to reflect your Tcl/Tk versions:
             -ltk8.4 -ltcl8.4 {}
  2.  IMPORTANT{*}- setup the LD_RUN_PATH environment variable to point to the location of the tcl/tk libraries (the "-L" value in Modules/Setup)
    • *setenv LD_RUN_PATH <Library Location>*
      • e.g., setenv LD_RUN_PATH/usr/lib
  3. Run make
    • make
  4. ** Unset the LD_RUN_PATH environment varible{*}
    • unsetenv LD_RUN_PATH
  5. Run
    • make install
  • No labels