Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2009-06-14 20:20:24
Size: 2864
Editor: PaulBoddie
Comment: Made an attempt at answering this question.
Revision 3 as of 2011-03-26 23:31:38
Size: 3002
Editor: PaulBoddie
Comment: Added categories.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from How do I run Python based software from SourceForge?
Line 48: Line 49:
----
CategoryAskingForHelp CategoryAskingForHelpAnswered

How do I run Python based software from SourceForge?

There isn't a straightforward answer to this question because projects on SourceForge often provide software both in source form as well as in binary (executable) form. Consider the MySQL for Python packages, available via the "Download" link on the project page: in this case, you'll choose mysql-python and be presented with a list of files (under "Filename").

  • If you use Windows, you'll probably only need to download and run the executable installers (ending in .exe).

  • If you use another platform, at least for other packages there might be similar binary packages (ending in .rpm or .deb, for example) which you would then install using the system's package manager.

  • For files ending in .egg you can use easy_install to install the software and make it available on your system.

  • For archive files ending in .zip, .tar.gz or .tgz, .tar.bz2 or .tbz2, you need to unpack the software and build it from the sources, typically.

Building files from source (the last alternative above) can be tricky, but the general procedure is usually something like this:

  1. Inspect the archive file to see what the unpacked file will produce: you don't want the unpacking process to put files all over the place. For example:
     unzip -l package-1.0.zip
     tar ztf package-1.0.tar.gz
     tar jtf package-1.0.tar.bz2
  2. If the output of the above suggests that the files inside the archive will appear in a common directory (package-1.0, for example) then move on to the next step. Otherwise, make a new directory and move into it:

     mkdir package-1.0
     cd package-1.0
  3. Now unpack the archive using one of the following:
     unzip package-1.0.zip
     tar zxf package-1.0.tar.gz
     tar jxf package-1.0.tar.bz2

    If you created a new directory, you may need to refer to the archive in the parent directory (../package-1.0.zip, for example). You can skip the next step, though.

  4. Enter the root directory of the package, just created when you unpacked the archive:
     cd package-1.0

Now read the documentation! There will probably be a README or INSTALL file in the directory - this will explain the rest of the installation procedure.

  • Some software can be run straight from the unpacked archive - this will usually be mentioned in the documentation, but it can be quite common for games written using PyGame to have a run_game.py (or run_game.pyw) file, and you can just run that with python.

  • Other software will provide a setup.py program which can be used to install the software.


CategoryAskingForHelp CategoryAskingForHelpAnswered

Asking for Help/How do I run Python based software from SourceForge? (last edited 2011-03-26 23:31:38 by PaulBoddie)

Unable to edit the page? See the FrontPage for instructions.