Bashtheparty Bashtheparty - 7 months ago 141
Linux Question

ImportError: No module named dns.message

when I try to run

sudo python
in Ubuntu, I keep getting this error:

Traceback (most recent call last):
File "", line 21, in <module>
import dns.message
ImportError: No module named dns.message

I have the correct repository cloned (see here for GitHub link) and I'm in the correct directory. I've tried running it in Kali linux and it works flawlessly. My intention is to do a
gnome-terminal -e "sudo python"
and make the command run in another terminal. Thank you in advance.


Try running the command

pip install dnspython

or, if you are using your system Python (not recommended)

sudo pip install dnspython

This will install the dns package that is currently missing. If, as you say, you have cloned the repository and want to use that version (and possible edit it) you may instead use

[sudo] pip install -e .

from the cloned directory.