python-nmap模块运行报错'module' object has no attribute 'PortScanner'

python-nmap模块运行报错'module' object has no attribute 'PortScanner'

python使用nmap模块时报错

File "nmap.py", line 10, in
nm = nmap.PortScanner()
AttributeError: 'module' object has no attribute 'PortScanner'

解决方法

  卸载nmap模块和python-nmap模块,重新安装python-nmap即可。

#先卸载之前安装过的
pip uninstall nmap
pip uninstall python-nmap

#再进行安装
pip install python-nmap

OK,问题解决。

python-nmap模块运行报错'module' object has no attribute 'PortScanner'

上一篇:Attribute(特性),怎么用才更好? —— 字段编号被误解了


下一篇:Html5 之 Canvas