Python on NetBSD - /usr/pkg/ vs /usr/local/
Hal Murray
hmurray at megapathdsl.net
Mon Feb 5 20:21:23 UTC 2018
Python on NetBSD doesn't search /usr/local/lib/
It looks in /usr/pkg/...
-bash-4.4$ python
Python 2.7.14 (default, Oct 15 2017, 00:57:13)
[GCC 4.8.4] on netbsd7
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/usr/pkg/lib/python27.zip', '/usr/pkg/lib/python2.7',
'/usr/pkg/lib/python2.7/plat-netbsd7', '/usr/pkg/lib/python2.7/lib-tk',
'/usr/pkg/lib/python2.7/lib-old', '/usr/pkg/lib/python2.7/lib-dynload',
'/usr/pkg/lib/python2.7/site-packages']
>>>
Background:
ntpq dies:
-bash-4.4$ ntpq
Traceback (most recent call last):
File "/usr/local/bin/ntpq", line 73, in <module>
ntp.util.check_unicode()
AttributeError: 'module' object has no attribute 'check_unicode'
-bash-4.4$
Poking around, I discover an old ntp/util.py in
/usr/pkg/lib/python2.7/site-packages/ntp/util.py
new stuff is getting installed in
/usr/local/lib/python2.7/site-packages/ntp/util.py
-rw-r--r-- 1 root wheel 47609 Dec 29 16:34 /usr/pkg/lib/python2.7/site-pack
ages/ntp/util.py
-rw-r--r-- 1 root wheel 47993 Jan 22 02:11 /usr/local/lib/python2.7/site-pa
ckages/ntp/util.py
What's the right fix?
--
These are my opinions. I hate spam.
More information about the devel
mailing list