1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Python nmap program was not found in path error even nmap installed and nmap.exe is...

Discussão em 'Python' iniciado por Stack, Setembro 10, 2025.

  1. Stack

    Stack Membro Participativo

    For some reason I can't use nmap on python. I have python-nmap installed as a library. Whenever I try to use PortScanner(), I get path error but I have nmap installed on my computer and it is even in path.

    import nmap

    nm = nmap.PortScanner()

    print(nm)


    The error is

    raise PortScannerError(
    nmap.nmap.PortScannerError: 'nmap program was not found in path. PATH is : C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\nodejs\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Program Files (x86)\\dotnet\\;C:\\Users\\Anti\\AppData\\Local\\Programs\\Python\\Python38\\Scripts\\;C:\\Users\\Anti\\AppData\\Local\\Programs\\Python\\Python38\\;C:\\Program Files\\Java\\jdk-13.0.2\\bin;C:\\Users\\Anti\\Desktop\\Selenium;C:\\Users\\Anti\\Desktop\\C++;C:\\ffmpeg\\bin;;C:\\Users\\Anti\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\MinGW\\bin;C:\\Users\\Anti\\AppData\\Roaming\\npm;C:\\Users\\Anti\\.dotnet\\tools;C:\\Program Files (x86)\\Nmap'


    My nmap files are in the path as you can see.

    C:\\Program Files (x86)\\Nmap


    I tried to reinstall nmap and add in path again, nothing changed. I can use the nmap command directly on cmd without any problems. By the way, I don't use virtualenv. How can I solve this?

    Continue reading...

Compartilhe esta Página