Problem installing ppgplot

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Enno Middelberg

    Problem installing ppgplot

    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


    -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/downl..._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 "ImportErro r: 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.M. Kuchling

    #2
    Re: Problem installing ppgplot

    On 20 Aug 2003 12:07:06 GMT,
    Enno Middelberg <emiddelb@mpi fr-bonn.mpg.de> wrote:[color=blue]
    > 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.[/color]

    The correct file to look for is libcpgplot.a.

    --amk

    Comment

    • A.M. Kuchling

      #3
      Re: Problem installing ppgplot

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

      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

      Comment

      Working...