The notes below concentrate specifically on installing PythonCard from RPMs on a Mandrake system. For other Linux distributions which also use the RPM format for packages (for example, SuSE, RedHat or Fedora) the process will be broadly similar, but you should take care to select the correct versions of the various RPMs that are required. Installing PythonCard on a Linux system requires the following steps:
- Ensure that you have a suitable version of Python installed.
- Download the wxPython RPM from the wxPython.org site.
- Download PythonCardPrototype RPM from the PythonCard site.
- Install wxPython.
- Install PythonCardPrototype.
- Confirm the installation works.
Check your Python version
PythonCard requires that you have Python 2.3 or higher installed. At the time of writing, it is known that all versions of Mandrake Linux from 9.1 upwards install a suitable Python version by default. If you are still using version 9.0 or lower, you really should think seriously about upgrading.
To check what version you have installed, open up a shell session (xterm, konsole, gnome-terminal, etc, etc) and type the following:
Python 2.3 (#2, Aug 31 2003, 17:27:29)
[GCC 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> (Type Ctrl-D here to exit)
This Linux system has Python 2.3 installed, so there's no problem here. :-)
Downloading the wxPython RPMs
PythonCard relies on the wxPython package. The specific wxPython RPMs you will need (at the time of writing, at least) are as follows:
Whilst the versions of wxPython which are built against the older GTK1.0 libraries will work, the GTK2 versions offer some advantages as far as Mandrake is concerned (widgets look slightly 'nicer' and execution speed is improved) and it is these which are recommended.
If you are installing on a distribution other than Mandrake, you should consult the wxPython download page at http://www.wxpython.org/download.php#binaries to determine the correct RPMs for your system.
Save the files somewhere convenient on your system. Make a note of the location for later.
Downloading the PythonCard RPM
The latest version of the PythonCard RPMs are always available via the Linux2000 PythonCard page , and are also mirrored on the main Pythoncard site on SourceForge - click here to go to the download page. Supported Mandrake Linux distributions for RPM installation are 10.0 and 10.1 in both Community and Official flavours.
Download http://www.linux2000.com/downloads/PythonCard-0.8.2-1mdk.noarch.rpm and save the file somehwere convenient as before.
Installing the wxPython RPMs
Type 'su -' and enter your root password when prompted. The command to install the RPM is:
rpm -Uvh /home/fred/wxPython-common-gtk2-<type and version number>.i386.rpm
rpm -Uvh /home/fred/wxPython2.5-gtk2-<type and version number>.i386.rpm
You should replace "/home/fred" with the full path to where your browser saved the downloaded RPM and substitute the correct file type and version number of the file you have downloaded.
The command to install the PythonCard RPM is pretty similar:
rpm -Uvh /home/fred/PythonCard-0.8.2-1mdk.noarch.rpm
Again, replace "/home/fred" with the full path to where your browser saved the RPM, and substitute the relevant RPM file name for you distribution.
We'll run the PythonCardPrototype "minimal" application to check that the installation seems OK. To run this, open a shell prompt as your normal user, and type the following:
Figure 1. PythonCard minimal application window open to confirm installation is correct
If you see any error messages in your shell prompt window at this stage, and it's not immediately obvious what the problem is, post a message to the PythonCard Users mailing list - see the bottom of this page for details.
Assuming that the minimal application starts up okay, you can browse the other PythonCard sample applications with the command:
PythonCard Menu Items
You will find some new items on the window manager menu - the PythonCard resource editor will be found under Applications --> Development --> Development environments, whilst the PythonCard code editor and samples launcher will be found under Applications --> Development --> Tools.
If You Are Having Problems
Installing the software from RPM ought to be fairly straightforward. If for some reason either the RPM's won't install, or the minimal application doesn't run, go back over these instructions carefully. In particular, make sure that wxPython and PythonCard both appear in the site-packages folder in Python's lib folder.
If everything seems OK and you still can't get minimal.py to launch, post a message to the PythonCard Users Mailing List. (If you aren't yet a member, visit the list management page and join.)
PythonCard is available in the testing and unstable distributions. To install it su to root and type:
# apt-get install pythoncard
$Revision: 1.16 $ : $Author: alextweedly $ : Last updated $Date: 2006/04/06 11:00:25 $