[PythonCAD] install pythoncad from source
fb102 at soton.ac.uk
Fri Jan 7 00:08:19 CET 2005
On Thu, Jan 06, 2005 at 03:14:48PM -0600, John Griessen wrote:
> called 'pythoncad' . . . . apt-get install pythoncad"
> That gave the same syptom of not accessing pygtk completely. It was ver.
Not sure what you actually mean here. Do you want to track the
latest version? If so the debian package is only one version behind
the released version and since you're tracking testing (that is at
least what I think coz of the packages and versions you list) I assume
it will be updated fairly soon. So unless you have very specific
needs it would be the easiest to just use the debian package (in
which case the gtk frontend can just be started by issuing 'pythoncad' on
the command line).
Nevertheless there is no reason why you shouldn't be able to
install from source...
> >>> import PythonCAD
> >>> sys.path
> ['', '/usr/lib/python23.zip', '/usr/lib/python2.3',
> '/usr/lib/python2.3/plat-linux2', '/usr/lib/python2.3/lib-tk',
> '/usr/lib/python2.3/lib-dynload', '/usr/lib/python2.3/site-packages',
> still no pythoncad on the list...
PythonCAD as package will never appear on the sys.path list.
sys.path is only a list of diretories where python will look for
a subdirectory named 'PyhonCAD' if you type 'import PytonCAD'.
The fact that the import statement did give no output means
everything was ok. If you really want to see it you could use
the 'dir()' command or you could do 'dir(PythonCAD)' to see which
attributes PythonCAD has. Only after the import though. Sorry
if this wasn't clear in the last email.
I see that the INSTALL file says it should show up in sys.path
but personally I don't see why. My guess is that that bit of
documentation is out of date.
> still have a broken install
If this statment was based on the output showed so far I am
rather convinced you don't have a broken install.
Did you follow the instructions from the file 'INSTALL' in the
tarball? If so did you manage to launch the application by
'gtkpycad.py' Also check the permissions (as noted in the
> select does not work as advertised and these messages show at the shell:
Are you in the gtk gui (gtkpycad.py) now? This is not very clear.
> line 401, in da_general_event
> handler(gtkimage, widget, event, _tool)
> "/usr/lib/python2.3/site-packages/PythonCAD/Interface/Gtk/gtkedit.py", line
> 77, in select_motion_notify
> widget.window.draw_rectangle(gc, gtk.FALSE, _xmin, _ymin, _rw, _rh)
> NameError: global name 'gc' is not defined
If this was from the gtk gui (in which case the install did
succeed btw) then this might be an actual bug. I don't know
pythoncad or gtk good enough to know what this traceback means
withouth spending hours looking at it. Maybe someone else does?
If it is a bug you might want to give an exact description on how
to reproduce the error.
> The gtk2.0 installed has this date:
> ll /usr/lib/python2.3/site-packages/gtk-2.0/gtk
> total 1212
> -rw-r--r-- 1 root root 3946 2004-11-22 05:36 __init__.py
> debian packages:
> python2.3-gtk2 2.4.1-2
> libgtk2.0-0 2.4.14-2
> libgtk2.0-bin 2.4.14-2
> libgtk2.0-common 2.4.14-2
> libgtk2.0-dev 2.4.14-2
You have python2.3-gtk2 installed and that should be enough since
it pulls in all the needed dependencies. So don't worry about
> I have no python2.2-gtk2 installed, and that may be a problem.
> the notes for install say python2.2 and later and 2.3 may be "too new"
> to still be compatible.
Make sure you have run the setup.py script with python2.3 (which
you had done as I could see from your last email) and then there
is no reason to worry about your python2.2 installation.
(Btw, do you actually have a reason to keep python2.2 lying
around? If you don't need it you would avoid confusion in the
future if you cleaned it up)
Debian GNU/Linux -- The power of freedom
www.debian.org | www.gnu.org | www.kernel.org
More information about the PythonCAD