gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gpsd built, gps.py and ntpsec/ntploggps


From: Gary E. Miller
Subject: Re: gpsd built, gps.py and ntpsec/ntploggps
Date: Sun, 21 Feb 2021 12:02:48 -0800

Yo Michael!

On Sun, 21 Feb 2021 15:57:25 +0100
Michael Byczkowski <by@by-online.de> wrote:

> I’ve built gpsd from source on my Raspberry Pi’s Debian Buster,
> everything went very smooth, I’m just stuck with the Python progs:
> Finally, Ive figured out, how to make gps.py accessible for all user
> by creating a file /usr/lib/python3/dist-packages/gps.pth with the
> contents '/usr/local/lib/python3/dist-packages’, so far so good. Now
> ntpsec’s ntploggps still breaks with 'can't find Python GPSD
> library’; any ideas?

Per the FHS, user built programs should not install in /usr/lib to avoid
conflicts with system/packager installed programs.  Conflicts between
user built, and system installed programs are very commer, so I beleive
the FHS is correct.

When you built gpsd, it said something like this:

    "Ensure your PYTHONPATH includes /usr/local/lib/pythonXXXX"

Did you follow that instruction?

Easy to see, just run this:

    $ echo $PYTHONPATH
    /usr/local/lib/pythonXXXX

> P.S.: It would be great to include the topic of setting PYTHONPATH in
> greater length in the build/install doc, to avoid issues like
> 'ubxtool: failed to import gps, check PYTHONPATH’, and help me making
> PYTHONPATH persistent across sessions and users, thank you!

Sadly this is very distro dependent, and mutates frquently.  If you figure
out how to do so for your (unspecified) distro, then I will add it to
the doc.

For those that use bash, just put this in your ~/.bashrc:

        export PYTHONPATH=/usr/local/lib/pythonXXXX

I often keep 6, or more, python verions installed at any one time, so
juggling that requires constant attention.  Changing PYTHONPATH becomes
second nature.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpRc8O6ZFNi2.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]