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:
- Download Python from the python.org site.
- Download wxPython from the wxPython.org site.
- Install Python
- Install wxPython
- Confirm the installation works
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.
PythonCard relies on the wxPython package. wxPython 22.214.171.124 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).
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.
wxPython also comes as an automatic installer. Just double-click on the file you downloaded (it's called wxPython-126.96.36.199-Py22.exe) and follow the instructions. By default, wxPython will be installed into Python22\Lib\site-packages.
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.
OK, now comes the acid test. Open the folder called "minimal" in Python22\Lib\site-packages\PythonCardPrototype\samples. Find the icon labeled minimal.py 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
tar zxvf Python-2.2.3.tgz
Is the build OK? make test
now make a script which switches the shell to the newly built python
type in this and save the file
#! /bin/bash export PATH=".:/sw/release/python/bin:$PATH"
chmod +x /sw/switch-python.sh
source the script
should now show the version you've just built
should show /sw/release/python/bin/python
Down load a tar ball from http://www.wxwindows.org
unpack the src
tar zxvf wxGTK-2.4.1.tar.gz
./configure --prefix=/sw/release/wx --with-gtk
become root for a while
add at the end of the file
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
down load the tarball from http://www.wxPython.org
tar zxvf wxPython-188.8.131.52.tar.gz
firstly make sure we are running the correct python
should show '/sw/release/python/bin/python'
python setup.py build python setup.py install
cd demo python demo.py
down load the tarball from http://www.pythoncard.org
tar zxvf PythonCardPrototype-0.7.1
python setup.py build
python setup.py install
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 setup.py 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);
Create a working directory (I use /home/build) and unpack these archives into it;
tar -xvf /tmp/downloads/wxGTK-2.4.1.tar.gz
tar -xvf /tmp/downloads/wxPython-184.108.40.206.tar.gz
Then install wxGTK (as a superuser);
Next, install wxPython (as a superuser);
python setup.py 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 http://www.wxpython.org/download.php. You'll want the version which is built against Python 2.2 - as of the time of writing, this is wxPythonGTK-py2.2-220.127.116.11-2.i386.rpm. Download this file to your machine. Use 'su' to become root and install the RPM with the command:
rpm -Uvh wxPythonGTK-py2.2-18.104.22.168-2.i386.rpm
Download and install PythonCard-0.7
tar -zxvf PythonCardPrototype-0.7.tar.gz
chmod 755 setup.py
su (enter your root password when prompted)
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: