Problem installing ppgplot

Discussion in 'Python' started by Enno Middelberg, Aug 20, 2003.

  1. 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
     
    Enno Middelberg, Aug 20, 2003
    #1
    1. Advertising

  2. On 20 Aug 2003 12:07:06 GMT,
    Enno Middelberg <> wrote:
    > 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.M. Kuchling, Aug 20, 2003
    #2
    1. Advertising

  3. 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
     
    A.M. Kuchling, Aug 20, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CT
    Replies:
    0
    Views:
    1,344
  2. Lee
    Replies:
    0
    Views:
    464
  3. feman
    Replies:
    0
    Views:
    2,848
    feman
    Nov 4, 2004
  4. Dennis Hore
    Replies:
    2
    Views:
    543
    bwani
    Nov 7, 2004
  5. championsleeper
    Replies:
    0
    Views:
    583
    championsleeper
    Jan 26, 2005
Loading...

Share This Page