Installation

Linux Installation procedure

You will need to have Python and PyGTK installed before you can run PythonCAD. Installing these programs is highly platform specific, so no installation guide for these requirements can be provided here. You need to follow whatever steps your platform requires, whether it is installation via a pre-built package or a download/compile/install routine.

The installation of PythonCAD is done in two steps. First, you need to invoke the setup.py script:

$ python setup.py install

Now, copy the file gtkpycad.py to a directory in which you can install programs. For example, copy it to /usr/local/bin.

$ cp gtkpycad.py /usr/local/bin
$ chmod a+x /usr/local/bin/gtkpycad.py

At this point you should be set. Just type gtkpycad.py (without the quotes) at the prompt and the program should start.

The examples above assume that you do not need to be the root user to do the installation. Whether you do the installation as the administrator or not depends on your system configuration. There is no reason to make the gtkpycad.py script a setuid script.

Update: PythonCAD has a means of reading a global and user preference file. Installing the global preference file will require root access. To install the file prefs.py, as the root user do the following.

# mkdir /etc/pythoncad
# cp prefs.py /etc/pythoncad

The preferences file prefs.py is written in Python. There are numerous comments in it describing the various items that can be set, and the file also has examples of adding new linetypes, drawing styles, and dimension styles to PythonCAD. This file can also be copied into a .pythoncad directory in a user home directory, allowing an individual user to add additional customization to PythonCAD beyond those in the global preferences file.

Windows Installation procedure

PythonCAD does run on Windows if you have the Windows ports of the required libraries and modules. The following links can help you get the GTK and PyGTK libraries. Please note that there almost certain to be issues with regards to file saving and loading on the windows ports due to line-terminating differences. These will be worked out eventually.

  1. Get GTK for Windows http://www.dropline.net/gtk/
  2. Download the PyGTK Windows Installer. http://www.pcpm.ucl.ac.be/~gustin/win32_ports/
  3. Install it and figure out that you need the Python Installer (that's not explained).
  4. Install it and figure out that you also need PyCairo and PyGobject. (not explained)
  5. Install Py[Cairo|Object], try PyGTK, and figure out that you also need the GTK+ runtime for windows, which is on an unofficial webpage, since the official win32 gtk+ binaries are a bunch of .zip files. (not explained and very hard to figure out)

Or: Get the All-in-one Python GTK installer and save all that hassle: http://osl.ulpgc.es/~arc/gnome/pygtk-setup.exe

  1. Once python and GTK and PyGTK are installed (assuming python is installed in its default location C:\python25)
  2. download PythonCAD and unpack it into a folder
  3. open a Windows command prompt window
  4. CD to the pythonCAD folder
  5. Give the following command: \python25\python setup.py install
  6. run PythonCAD with this command: \python25\python gtkpycad.py

Mac Installation procedure

Note; ~very~ beta procedure, compiling rights on system required.

PythonCad Installation tasks for OS X Tiger 10.4.x;

  1. Install MacSvn Subversion
  2. Register and Install Xcode (free account required) v2.4.1
  3. Build Gtk+ Mac OS X Directions and Build Script
  4. Download PythonCAD and install per Linux installation
 
installation.txt · Last modified: 2007/04/20 20:33 by 70.127.168.210     Back to top