Tuesday, December 2, 2008

Installing Python on Linux + Libraries- WITHOUT root access and in user defined dir

Isntructions to install python on linux without root access and in user defined dir.
Basically we confiugre and build python to a usr defined dir, make sure we install easy_isntall and use that to install rest of packages.

A. Install easy_install:
  1. * Create a new dir (i.e. ~/PYTHON)
  2. * Download zlib
  3. * Compile zlib in shared mode:
  4. ** > ./configure -s --prefix=~/PYTHON
  5. ** > make
  6. ** > make install
  7. * Download Python 2.5
  8. * Compile and install Python pointing to zlib and telling it where to install:
  9. ** > ./configure --with-zlib=~/PYTHON/include --prefix=~/PYTHON
  10. ** > make
  11. ** > make install
  12. * Edit your env var
  13. ** PATH=~/PYTHON/bin:$PATH
  14. ** export PYTHONHOME=~/PYTHON
  15. ** export PYTHONPATH=$PYTHONHOME:~/PYTHON/lib
  16. ** export LDFLAGS="-L/anfs/bigdisc/jkt27/PYTHON/lib -L/usr/lib" (so configure can find .so/.o files)
  17. ** export CPPFLAGS="-I/anfs/bigdisc/jkt27/PYTHON/include -I/usr/include" (so make/GCC can find header files)
  18. ** alias python='~/PYTHON/bin/python'
  19. * Download setuptools
  20. * Install:
  21. ** sh setuptools-0.6c9-py2.5.egg --prefix=~/PYTHON
B. Install packages
  1. > easy_install networkx
  2. Download numpy and install > python setup_all.py install
  3. etc.

Tuesday, October 7, 2008

Python on Vista

Instructions to install Eclipse with PyDev plugin and all scientific libraries (NumPy, SciPy, R, RPY, NetworkX).

Notes: you must always take note of the python version you have, and install libraries that match! Also, you must always isntall using admin rights (i.e. start a new cmd window with admion rights and run the installer)!!!
  1. Download and install Eclipse
  2. Use the update manager to install PyDev (http://pydev.sourceforge.net/updates/)
  3. Doanload & Install Python (http://www.python.org/download/windows/)- make sure you run as admin in vista. Also make sure you note the version! I recommend v2.5, as all the science pacakges only support this version at the moment
  4. Download & install NumPy (http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103) for the version of python your have installed
  5. Download & install SciPy for the version of python you have isntalled (http://www.scipy.org/Download)
  6. Download & install networkX
  7. Download & nstall Win32 extensions (http://starship.python.net/crew/mhammond/win32/Downloads.html)
  8. Download (only download!) the RPY (http://rpy.sourceforge.net/download.html). Take note of the version of R it requires in the file name
  9. Download & install the required version of R as from the previous step (http://ftp5.gwdg.de/pub/misc/cran/)
  10. Now Install RPY downloaded from step 8
  11. Install easy_install by downloading this and running from command line.
  12. Optional: Download and install pysco to speed up debugging and python runtime (http://psyco.sourceforge.net/index.html). There is a win32 installer for v2.5
You're now ready to roll!

Also try this: http://www.pythonxy.com/foreword.php??

Tuesday, August 26, 2008

Reading List

  • Réka Albert, Hawoong Jeong,
    Albert-László Barabási