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,问题解决。

image-20210428160225852

posted @ 2021-04-29 11:25  ruoli-s  阅读(1258)  评论(0编辑  收藏  举报