Where is the problem?
import nmap
I installed nmap and python, and when I use import nmap
there is no any problem. But when use:
nmap.PortScanner()
this error is thrown:
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'"
I have had the same problem. Just type in a terminal:
and problem solved.