Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use DNS resolver in Python 3?

I want to check MX-Record from Python. So I installed the dnspython package, but when I try to import following library:

import dns.resolver

It shows the following error:

ModuleNotFoundError: No module named 'dns'.

I use PyCharm and Python 3.

like image 710
Awesome Avatar asked Jan 02 '18 05:01

Awesome


Video Answer


1 Answers

You should install https://github.com/rthalley/dnspython first

pip install dnspython

like image 88
Alexey Avatar answered Sep 29 '22 10:09

Alexey