Yo Hal!

On Wed, 02 Apr 2025 23:05:55 -0700
Hal Murray <halmur...@sonic.net> wrote:

> > Best to educate the user to debug his own Python issues.    
> 
> Have you looked at README-PYTHON?  

See attached.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        g...@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
diff --git a/README-PYTHON b/README-PYTHON
index a6a915317..1e2227993 100644
--- a/README-PYTHON
+++ b/README-PYTHON
@@ -1,13 +1,19 @@
 If you are trying to debug something like:
   ImportError: No module named ntp
+or:
+  ImportError: No module named gps
 you have come to the right place.
 
-The default location where we install our python libraries is
+When building NTPSec for installtion, the install procedure asks the
+current python for the proper locatiopn to install the python modules.
+On most distributions the default location where we install our python
+libraries is
   /usr/local/lib/pythonX.Y/site-packages/
-where X and Y are the python version numbers.
+where X and Y are the python version numbers.  Y may be suffixed with
+'t' for threaded python versions.
 
 Unfortunately, that's not on the default search path of several
-OSes/distros, in particular Fedora and NetBSD.
+OSes/distros, in particular Fedora, NetBSD, Gentoo, etc..
 (Fixed in Fedora 39, Sep-2023, ??)
 
 Python has a search path that is used to find library modules when
@@ -21,8 +27,6 @@ Info on Python's search path:
 or
   https://docs.python.org/3/tutorial/modules.html
 
-
-
 There are several ways to make things work.
 
 1: You can modify the location where waf will install the libraries.
@@ -33,13 +37,14 @@ For NetBSD, something like this should work:
     ...
 You need to specify it at configure time.  Install time is too late.
 
+Note: that distros do not want users installing modules in the
+distro reserved areas.
 
 2: You can setup your PYTHONPATH with something like this:
   export PYTHONPATH=/usr/local/lib/python2.7/site-packages
 For bash, you can add that line to your .bashrc or the system /etc/bashrc
 If you don't put it in the system file, all users will have to do this,
-including root if root uses any ntp scripts.
-
+every login.  Including root if root uses any ntp scripts.
 
 3: You can add to the default search path by setting up a .pth file
 with something like this:
@@ -48,7 +53,6 @@ with something like this:
 This works for all users, including root.
 Note that the pth file must be on the default Python search path.
 
-
 OTOH if you run into something like:
     Traceback (most recent call last):
       File "/usr/bin/ntpdig", line 419, in <module>
_______________________________________________
devel mailing list
devel@ntpsec.org
https://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to