## page was renamed from メモ/python/dnspython = メモ/python/dnspython = <> https://github.com/rthalley/dnspython http://www.dnspython.org/ dnspython is a DNS toolkit for Python python2.7 で setup.py install 1.12.0 tests/ で make (test 414件 OK) http://www.dnspython.org/ https://dnspython.readthedocs.io/en/stable/query.html#udp [[/dns.resolver]] [[/blog]] [[/test_query.py]] ----- dnspython 2.0.0 https://pypi.org/project/dnspython/2.0.0/ pip install dnspython==2.0.0 {{{ sudo apt-get update sudo apt install python-pip }}} が必要な環境だった。 しかも、2.0.0は入らず。 {{{ $ pip install dnspython Collecting dnspython Downloading https://files.pythonhosted.org/packages/ec/d3/3aa0e7213ef72b8585747aa0e271a9523e713813b9a20177ebe1e939deb0/dnspython-1.16.0-py2.py3-none-any.whl (188kB) 100% |████████████████████████████████| 194kB 3.1MB/s Installing collected packages: dnspython Successfully installed dnspython-1.16.0 }}} == 2.0.0. == {{{ $ pip install dnspython==2.0.0 Collecting dnspython==2.0.0 Could not find a version that satisfies the requirement dnspython==2.0.0 (from versions: 1.11.0, 1.11.1, 1.12.0, 1.13.0, 1.14.0, 1.15.0, 1.16.0) No matching distribution found for dnspython==2.0.0 そういう前提か。 tmaeno@skr:~$ }}} ---- /!\ '''Edit conflict - other version:''' ---- == 3.6 == setuptoolsのインストールからやらないとだめだった。-- ToshinoriMaeno <> {{{ $ cd setuptools-49.6.0/ tmaeno@skr:~/setuptools-49.6.0$ ls CHANGES.rst _distutils_hack launcher.c setup.cfg tox.ini LICENSE bootstrap.py msvc-build-launcher.cmd setup.py MANIFEST.in conftest.py pavement.py setuptools PKG-INFO docs pkg_resources setuptools.egg-info README.rst easy_install.py pytest.ini towncrier_template.rst tmaeno@skr:~/setuptools-49.6.0$ sudo python setup.py install running install running bdist_egg running egg_info }}} この後、dnspythonも入る。 $ ls /usr/local/lib/python3.6/dist-packages/ {{{ dnslib easy-install.pth setuptools.pth dnslib-0.9.14.egg-info lib dnspython-2.0.0-py3.6.egg setuptools-49.6.0-py3.6.egg }}} ---- /!\ '''Edit conflict - your version:''' ---- == setup.py によるinstall == {{{ byte-compiling build/bdist.linux-x86_64/egg/dns/serial.py to serial.pyc File "build/bdist.linux-x86_64/egg/dns/serial.py", line 11 return f'dns.serial.Serial({self.value}, {self.bits})' ^ SyntaxError: invalid syntax }}} ---- /!\ '''End of edit conflict''' ----