哪里有问题?
import nmap
我安装了nmap和python,使用时import nmap
没有任何问题。但是使用时:
nmap.PortScanner()
抛出此错误:
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
nmap.PortScanner()
File "./nmap/nmap.py", line 153, 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 : /usr/lib /lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/local/games'"