我只是想创建一个nmap.PortScanner()对象。但是,每当我运行这行代码时,我都会收到以下错误
>>> import nmap
>>> nmap.PortScanner()
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
nmap.PortScanner()
File "C:\Python32\lib\site-packages\nmap\nmap.py", line 170, in __init__
raise PortScannerError('nmap program was not found in path. PATH is : {0}'.format(os.getenv('PATH')))
nmap.nmap.PortScannerError: 'nmap program was not found in path. PATH is : C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\ATI Technologies\\ATI.ACE\\Core-Static;C:\\Program Files (x86)\\QuickTime\\QTSystem\\'
我已经通过运行'python setup.py install'安装了nmap 如何让nmap正常工作?
答案 0 :(得分:1)