0

I am simply trying to create a nmap.PortScanner() object. However, whenever I run this line of code I get the following error

>>> 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\\'

I have installed nmap by running 'python setup.py install' How do I get nmap working?

Charles
  • 50,943
  • 13
  • 104
  • 142
ndurvasula
  • 185
  • 5
  • 18

1 Answers1

2
  1. make sure you install nmap and add it to your file path.
  2. I'm using python 2.7 and had continued problems, here was the fix:
seth
  • 36
  • 2