I have been using python dns module.I was trying to use it on a new Linux installation but the module is not getting loaded. I have tried to clean up and install but the ins
I was getting an error while using "import dns.resolver". I tried dnspython, py3dns but they failed. dns won't install. after much hit and try I installed pubdns module and it solved my problem.
I solved this by uninstalling and then re-installing the dnspython module with PIP.
$ pip uninstall dnspython
After the long list of files within pycache, type y to continue with the uninstall. After complete type:
$ pip install dnspython
I then ran my script and the errors were resolved.
You could also install the package with pip by using this command:
pip install git+https://github.com/rthalley/dnspython
ok to resolve this First install dns for python by cmd using pip install dnspython
(if you use conda first type activate
and then you will go in base (in cmd) and then type above code)
it will install it in anaconda site package ,copy the location of that site package folder from cmd, and open it . Now copy all dns folders and paste them in python site package folder. it will resolve it .
actually the thing is our code is not able to find the specified package in python\site package bcz it is in anaconda\site package. so you have to COPY IT (not cut).
I faced the same problem and solved this like i described below: As You have downloaded and installed dnspython successfully so
That's all. Now your problem will go
If dnspython isn't installed you can install it this way :
pip install dnspython
Now, dnspython will be installed successfully.
Very possible the version of pip you're using isn't installing to the version of python you're using. I have a box where this is the case...
try:
which python
python --version
pip -V
If it looks like pip doesn't match your python, then you probably have something like the multiple versions of python and pip I found on my box...
[root@sdpipeline student]# locate bin/pip
/home/student/class/bin/pip
/home/student/class/bin/pip-2.7
/usr/bin/pip
/usr/bin/pip-python
As long as I use /home/student/class/bin/pip (2.7 that matches my python version on that box), then my imports work fine.
You can also try installing pip from source: http://www.pip-installer.org/en/latest/installing.html
There's probably a better way to do this, I'm still learning my way around too, but that's how I solved it -- hope it helps!