Problem installing ppgplot

E

Enno Middelberg

Hi,

I want to install pgplot but I can't really get it to work. Here is
what I did; pgplot libraries are installed in ~/pgplot

-downloaded ppgplot-1.1.tar.gz from
http://www.astro.rug.nl/~breddels/python/ppgplot/

-PGPLOT_DIR was set correctly, so I tried python setup.py install, but
that stopped saying

-------------------------------------------------------------
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC
-I/homes/emiddelb/local2/include/python2.2/Numeric
-I/homes/emiddelb/local2/include/python2.2 -c ppgplot.c -o
build/temp.linux-i686-2.2/ppgplot.o

ppgplot.c:21: cpgplot.h: No such file or directory
-------------------------------------------------------------

-I found a website describing that error
(http://www.astro.rub.de/laboca/download/help_install_all_for_boa.html). I
copied cpgplot.h to my local include dir as I don't have root
permissions and re-ran the install script. Apparently, the gcc command
now worked, but another one now crashed:

-------------------------------------------------------------
gcc -shared build/temp.linux-i686-2.2/ppgplot.o -L/usr/X11R6/lib/
-L/homes/emiddelb/pgplot -L/usr/X11R6/lib/ -lcpgplot -lpgplot -lX11
-lm -lg2c -o build/lib.linux-i686-2.2/ppgplot.so

/usr/i486-linux/bin/ld: cannot open -lcpgplot: No such file or
directory
collect2: ld returned 1 exit status
-------------------------------------------------------------

I had the suspicion that the "-lcpgplot" was not correct, as the
pgplot distribution does not contain any other files named cpgplot.*
except for cpgplot.h and a cpgplot.c demonstration file.

I therefore tried to run the gcc command without "-lcpgplot" and got a
file called "ppgplot.so" in the "build/lib.linux-i686-2.2/"
subdirectory. I copied that file to
~/lib/python2.2/site-packages/ppgplot/ppgplot.so, i.e., to a directory
similar to all the other local packages, but now when I try to use it,
I get an error saying "ImportError: No module named ppgplot".

I still suspect that the installation is incomplete because all the
other packages have at least some python files.

Can someone give me a hint on how to fix this? I'm not a great
programmer and I do not know much of libraries and those things, I
just want to _use_ ppgplot :-/


Cheers,

Enno
 
A

A.M. Kuchling

I had the suspicion that the "-lcpgplot" was not correct, as the
pgplot distribution does not contain any other files named cpgplot.*
except for cpgplot.h and a cpgplot.c demonstration file.

The correct file to look for is libcpgplot.a.

--amk
 
A

A.M. Kuchling

On 20 Aug 2003 12:38:08 GMT,
copying build/lib.linux-i686-2.2/ppgplot.so ->
/homes/emiddelb/local2/lib/python2.2/site-packages

Hm. Is the /homes/emiddelb/... directory in Python's path? You can check
by doing "import sys ; print sys.path".

If the directory isn't in sys.path, you can add it by either setting the
PYTHONPATH environment variable before running Python, or by modifying
sys.path; it's just a list of strings, so you can do
sys.path.append('/homes/....').

If it *is* on the path, then I'm puzzled. Running 'python -v' will cause
Python to print out each filename it tries; maybe the file has strange
permissions or something.

--amk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top