尝试安装pydns模块时,出现此错误:
C:\Windows\system32>pip install pydns
Collecting pydns
Using cached pydns-2.3.6.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Shiva\AppData\Local\Temp\pip-build-294324_x\pydns\setup.py", line 12, in <module>
import DNS
File "C:\Users\Shiva\AppData\Local\Temp\pip-build-294324_x\pydns\DNS\__init__.py", line 14, in <module>
import Type,Opcode,Status,Class
ImportError: No module named 'Type'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Shiva\AppData\Local\Temp\pip-build-294324_x\pydns\
我也尝试了
pip install py3dns
,但是它不起作用。 最佳答案
pydns在Python 3中不受支持。您需要使用python 2.7才能使用它。
关于python - 安装pydns时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41342551/