PYTHONPATH

Gary E. Miller gem at rellim.com
Fri Nov 30 02:37:10 UTC 2018


Yo Hal!

On Thu, 29 Nov 2018 18:16:36 -0800
Hal Murray via devel <devel at ntpsec.org> wrote:

> Can somebody give me a lesson in PYTHONPATH?

For some reason the concept is difficult for people.  Basically it
contains the places to look for Python modules that are not installed
in the system locations.

> My setup seems to work without it.

Where are you modules getting isntalled to?  Are you sure you have no
PYTHONPATH?

> ./waf configure gives a warning, but it can easily get lost is all
> the other stuff flying by.

Yup.  Which is why many of the Python programs also give error messages
when modules are not found to check the PYTHONPATH.

> We should at least give a URL for a good explanation.

https://docs.python.org/2/using/cmdline.html#envvar-PYTHONPATH

> Should waf crash rather than warn?

Certainly not.  You said your system works, that would break it.

PYTHONPATH is not needed to build and install.  PYTHONPATH is not needed
for system installs (/usr instead of /usr/local).  A PYTHONPATH check is
pointless for cross compiling.  Very common to install NTPsec and then
later fix the PYTHONPATH.

> Should it defer the test to the end where the warning might get seen?

If we do that for PYTHONPATH we need to do it for a ton of other stuff
too.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20181129/65ebc6a3/attachment.bin>


More information about the devel mailing list