installing ppgplot (using OS X 10.3 / gcc 3.4 / python 2.3b)

Dennis Hore dhore at
Sun Jun 6 21:06:38 CEST 2004

I'm trying to install Nick Patavalis' ppgplot package on Mac OS X 10.3 
with python 2.3.  I first sent this message to Nick, but he said he 
doesn't have any experience with the Mac platform.

after installing using python install (using Numeric; no error 
messages), and then in python trying
 >>> import ppgplot

i get:

Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/sw/lib/python2.3/site-packages/ppgplot/", line 1, 
in ?
     from _ppgplot import *
ImportError: Failure linking new module: : dyld: python Undefined 

This looks very familiar, it's the standard error messages that occur 
when an application is compiled without specifying "-framework AppKit" 
on the Mac as an option to the linker.

Also, I'm using gcc 3.4, so the linker options must now be specified as:
-Wl,-framework -Wl,AppKit

I first tried to include these options in, but gcc ignores all 
linking options when it is told to compile only with -c

So then I ran:
make clean

The compiling phase should be okay.  Then I tried to manually do the 
linking with

gcc -L/usr/X11R6/lib/ -L/sw/lib/ -L/sw/lib/pgplot -bundle 
-flat_namespace -undefined suppress -lcpgplot -lpgplot -lpng -lX11 -lm 
-lg2c -lz -Wl,-framework -Wl,AppKit
-o build/lib.darwin-7.4.0-PowerMacintosh-2.3/ppgplot/

no errors, but importing the ppgplot library into python gives the same 
old errors again (looks like missing AppKit).  Back to square one! :)

By the way, I have a working pgplot installation.  I can compile my own 
fortran programs which call pgplot subroutines with:

g77 -o dennis_demo dennis_demo.f -L/sw/lib/pgplot -L/usr/X11R6/lib 
-L/sw/lib -L/usr/lib -lpgplot -lpng -lz -lX11 -Wl,-framework -Wl,AppKit

Any suggestions?

best wishes,

More information about the Python-list mailing list