ОС CentOS 7 в LXC-конейнере, через yum поставил python-dns
Есть два одинаковых скрипта
[root@dns /]# cat /root/test.py
import sys;
import pprint;
pprint.pprint(sys.path)
import dns.resolver
[root@dns /]# cat /root/123/dns.py
import sys;
import pprint;
pprint.pprint(sys.path)
import dns.resolver
Первый скрипт отрабатывает, второй нет. Непонятно почему
[root@dns /]# python /root/test.py
['/root',
'/usr/lib/python2.7/site-packages/setuptools-18.1-py2.7.egg',
'/usr/lib64/python27.zip',
'/usr/lib64/python2.7',
'/usr/lib64/python2.7/plat-linux2',
'/usr/lib64/python2.7/lib-tk',
'/usr/lib64/python2.7/lib-old',
'/usr/lib64/python2.7/lib-dynload',
'/usr/lib64/python2.7/site-packages',
'/usr/lib/python2.7/site-packages']
[root@dns /]# python /root/123/dns.py
['/root/123',
'/usr/lib/python2.7/site-packages/setuptools-18.1-py2.7.egg',
'/usr/lib64/python27.zip',
'/usr/lib64/python2.7',
'/usr/lib64/python2.7/plat-linux2',
'/usr/lib64/python2.7/lib-tk',
'/usr/lib64/python2.7/lib-old',
'/usr/lib64/python2.7/lib-dynload',
'/usr/lib64/python2.7/site-packages',
'/usr/lib/python2.7/site-packages']
['/root/123',
'/usr/lib/python2.7/site-packages/setuptools-18.1-py2.7.egg',
'/usr/lib64/python27.zip',
'/usr/lib64/python2.7',
'/usr/lib64/python2.7/plat-linux2',
'/usr/lib64/python2.7/lib-tk',
'/usr/lib64/python2.7/lib-old',
'/usr/lib64/python2.7/lib-dynload',
'/usr/lib64/python2.7/site-packages',
'/usr/lib/python2.7/site-packages']
Traceback (most recent call last):
File "/root/123/dns.py", line 6, in <module>
import dns.resolver
File "/root/123/dns.py", line 6, in <module>
import dns.resolver
ImportError: No module named resolver