The steps below are from the installation page in the documentation which covers installing PythonCard on Windows. These steps need to be adapted for Linux, so I started the process below, but most of the links and specific steps still refer to Windows. Linux users are encouraged to put edit appropriate info. When the instructions are complete I'll convert this back to a real HTML page and add it to the main documentation site.

The Linux instructions could cover RPMs, Debian, tar.gz files, etc. The main thing is to walk step by step through the process, so that even someone unfamiliar with Linux could get Python, wxPython, and PythonCard installed and running.

Jon Dyte has provided instructions at the bottom of this page for building all the components on Linux.

How to Install PythonCard on Linux

Installing PythonCard on your system requires the following steps:

Downloading Python

Many Linux distributions come with Python as standard. Check your installation media and documentation, or just fire up an xterm window and type 'python' at the prompt. If Python isn't installed or supplied Python 2.2.3 is available from the main Python 2.2.3 page.

Follow the instructions on that page to download and install Python.

Note that PythonCard uses some of the XML modules from the standard library. Some Linux distributions (in particular SuSE) ship Python in a number of RPMs. Make sure you have installed the python-xml RPM before continuing.

Downloading wxPython

PythonCard relies on the wxPython package. wxPython is available from the wxPython site. If your distributions supports installing from the Red Hat Package Manager (RPM) format then just select the appropriate wxPythonGTK link for your version of Python (2.2 or 2.3).

Downloading PythonCard

The latest version of PythonCard is always available via the PythonCard download page. Click on this PythonCardPrototype-0.7.1.tar.gz link to begin the download. Tell your browser where you want the file stored and the download proceeds. Note where on your system the file is saved by your browser.

Installing wxPython

wxPython also comes as an automatic installer. Just double-click on the file you downloaded (it's called wxPython- and follow the instructions. By default, wxPython will be installed into Python22\Lib\site-packages.

Installing PythonCardPrototype

PythonCard also comes as an automatic installer. Just double-click on the file you downloaded and follow the instructions. By default, the PythonCard framework will be installed into Python22\Lib\site-packages.

Confirming Installation

OK, now comes the acid test. Open the folder called "minimal" in Python22\Lib\site-packages\PythonCardPrototype\samples. Find the icon labeled and double-click it. In a few moments (after an operating system console window has appeared), a small window like the one shown in Figure 1 will appear. This indicates that your installation was successful and everything is working. Close the minimal application in the usual way and proceed with the Walk-Through.

Figure 1. PythonCard minimal application window open to confirm installation is correct

If for some reason this test fails, go back over these instructions carefully. In particular, make sure that wxPython and PythonCardPrototype both appear in the site-packages folder in Python's Lib folder.

How to build Python, wxWindows, wxPython and PythonCard from Source On Linux

The text in bold are commands you'd type at the shell

The text in italics is to be typed into a file and saved.


make some directories for the software to live in

cd /

mkdir /sw

mkdir /sw/release

mkdir /sw/release/python

mkdir /sw/release/wx

Python build

cd /sw

tar zxvf Python-2.2.3.tgz

cd Python-2.2.3

./configure --prefix=/sw/release/python


Is the build OK? make test

make install

now make a script which switches the shell to the newly built python

vi /sw/

type in this and save the file

#! /bin/bash

export PATH=".:/sw/release/python/bin:$PATH"

exit vi

chmod +x /sw/

source the script

. /sw/

python -V

should now show the version you've just built

which python

should show /sw/release/python/bin/python

wxWindows build

Down load a tar ball from

cd /sw/

unpack the src

tar zxvf wxGTK-2.4.1.tar.gz

cd wxGTK-2.4.1

./configure --prefix=/sw/release/wx --with-gtk


make install

become root for a while

vi /etc/

add at the end of the file


exit vi


exit root login

make sure you add /sw/release/wx and /sw/release/wx/bin to yr path

eg. export PATH="$PATH:/sw/release/wx/:/sw/release/wx/bin/"

this needs to be setup permanently either via a script

in /etc/profile.d (on Redhat) or ~/.bash_profile or ~/.bashrc

wxPython build

down load the tarball from

cd /sw

tar zxvf wxPython-

cd wxPython-

firstly make sure we are running the correct python

which python

should show '/sw/release/python/bin/python'

python build python install

cd demo python

PythonCard build

down load the tarball from

cd /sw

tar zxvf PythonCardPrototype-0.7.1

cd PythonCardPrototype-0.7.1

python build

python install

cd samples



I am assuming you do all of this in one shell, exactly as listed.

If you use multiple shells, for the process, make sure that you have

1) switched over to the python you built

2) put the wx and wx/bin directory on yr path

3) obviously I use the directories /sw and /sw/release for build and release areas. These can be changed to somewhere else, if you require.

Installing PythonCard on Debian

[AJT], updates by Ken Pronovici (the Debian maintainer)

Life is easier on the Debian GNU/Linux operating system. Because of the packaging system used in Debian, adding (or removing) software is a snap. If you haven't already, you may want to read up on apt-get and dpkg before trying to install PythonCard on a Debian system.

Note: there are always three distributions in Debian: stable (currently called 'woody'), testing (currently called 'sarge') and unstable (always referred to as 'sid', or 'still in development'). Most production servers run stable, hard core developers run unstable and pretty much everyone else uses testing, which is the release candidate for the next stable release.

The Easy Way

The easiest way of installing and maintaining PythonCard on your Debian system is to use the pre-built PythonCard packages, maintained by Ken Pronovici. These packages are currently only available in the Debian testing and unstable distributions. However, when 'sarge' is released (sometime in late 2004), then they will also be available in the stable distribution.

If you are running testing or unstable, just install the 'pythoncard' package:

apt-get install pythoncard

This will download and install the PythonCard libraries, utilities, documentation, etc., along with all of the required dependencies (Python, wxPython, etc.). The codeEditor, resourceEditor and findfiles tools will be available in your $PATH, and you will be able to find the documentation via the standard Debian documentation browsers (doc-central, dwww, etc.).

The Not-Quite-So-Easy Way

If you prefer, you can still install PythonCard from the source by hand on a testing or unstable system. Just download and install Python 2.3 and wxPython first:

apt-get install python2.3 libwxgtk2.4-python

Then download the PythonCard source distribution, unpack it to a directory (e.g /home/build/PythonCardPrototype-0.7.3), cd to the directory and type:

python install

Unless are working on the development of PythonCard itself, you are probably better off using the pre-built Debian packages, which will integrate better into your Debian system than the stock source install will.

The Hard Way

If you aren't ready to run testing then life is a little more tricky. Once a Debian distribution has been released as the new stable distribution, the Debian release managers freeze the packages that are part of that distribution. The release managers will only update the available packages for serious bug fixes (think "data loss") or for security problems.

As of this writing (April, 2004), stable ships with Python 2.1 and wxPython 2.2, while testing and unstable ship with Python 2.3 and wxPython 2.4. To run PythonCard on stable you need to install your own version of wxPython.

Remember: when Debian 'sarge' becomes the new stable release (sometime in late 2004), then you will be able to follow 'The Easy Way' instructions above.

There is a way to install wxPython 2.4 from the unstable distribution, but that then has a dependency on Python 2.3 and may break your nice neat stable system. I wouldn't recommend trying that unless you really know what you are doing - and then please share your experience via the mailing list.

The simplest (?) way to get PythonCard running is to download and install from source packages. Before doing that, though, you need to install one more Debian package;

apt-get install gtk1.2-dev

Now, go to the wxPython website and download the following files into a suitable directory (I use /tmp/downloads);

wxGTK-2.4.1.tar.gz wxPython-

Create a working directory (I use /home/build) and unpack these archives into it;

cd /home/build

tar -xvf /tmp/downloads/wxGTK-2.4.1.tar.gz

tar -xvf /tmp/downloads/wxPython-

Then install wxGTK (as a superuser);

cd /home/build/wxGTK-2.4.1

mkdir build

cd build

../configure --with-gtk


make install

ldconfig /usr/local/lib

Next, install wxPython (as a superuser);

cd /home/build/wxPython-

python install

The only blip I have found here is in maintaining the link to /usr/local/lib. Because the Debian packager doesn't know about wxGTK you may lose the link after running apt-get. If you have problems running PythonCard programs then just fire up a console, sign up to a superuser and type ldconfig /usr/local/lib.

Finally, install PythonCard from the source distribution (see the instructions above).

Installing PythonCard-0.7 Using RPM

This procedure details the simplest possible install of PythonCard-0.7 for those who run Redhat Linux 8.0, Mandrake Linux 8.2 or Mandrake Linux 9.0, and who don't want to build wxPython from the source tree.

Download and install the wxPythonGTK RPM

You can get this from the main wxPython download page, at You'll want the version which is built against Python 2.2 - as of the time of writing, this is wxPythonGTK-py2.2- Download this file to your machine. Use 'su' to become root and install the RPM with the command:

rpm -Uvh wxPythonGTK-py2.2-

Download and install PythonCard-0.7

The source tarball for PythonCard-0.7 can be downloaded from the PythonCard site on Sourceforge. Assuming that you save this in your home directory, the commands to install it are as follows:

tar -zxvf PythonCardPrototype-0.7.tar.gz

cd PythonCardPrototype-0.7

chmod 755

su (enter your root password when prompted)

./ install


Verify The Installation

To check that everything is working as expected, type the following commands. This assumes that you're still in the PythonCardPrototype-0.7 folder in your home directory that got created when you unpacked the PythonCard-0.7 source tarball:

cd samples


If all has gone well, you should be looking at the PythonCard samples program, from here you can explore the example apps and get a feel for all the cool things you can achieve with PythonCard. :-)

PythonCardLinuxInstall (last edited 2008-03-11 10:50:32 by localhost)

NOTE: To edit pages in this wiki you must be a member of the TrustedEditorsGroup.