web2py is described on the web site as a "free and open source full-stack enterprise framework for agile development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python." I've begun reading the web2py book so that I can use it in my classroom.

This describes how I installed and setup web2py in my home directory.

  1. Download web2py_src.zip.

  2. Open a terminal and run the following commands:
    • $ mkdir lib

    • $ mkdir lib/python

    • $ mkdir bin

  3. Add the following to the bottom of your .bashrc file:

          export PYTHONPATH
  4. Log out and log back in to allow the new bin directory and PYTHONPATH to take effect.

  5. Unzip the web2py_src.zip file (generating the web2py directory), and move web2py to your lib/python directory.

  6. Create a file named web2py in your bin directory with the following contents:

          #!/usr/bin/env sh
          cd $HOME/lib/python/web2py
          python web2py.py
    • Run $ chmod +x web2py to make this shell script executable.

  7. Run the following command from the terminal to install the python-tk package:

    • $ sudo aptitude install python-tk

  8. Add a launcher to your top desktop panel:
    • Right mouse click on the panel.
    • Click Add to Panel.

    • Click Custom Application Launcher.

    • Click Add.

    • Set Name: to web2py.

    • Set Command: to web2py.

    • Optionally, set the icon to lib/python/web2py/applications/examples/static/web2py_logo.png.

    • Click Add.

You should now be able to launch web2py by clicking on the launcher.

Web2Py (last edited 2010-05-11 15:39:26 by 158)