('Nmap not found', )

后端 未结 8 1062
难免孤独
难免孤独 2020-12-18 04:28

Where is the problem?

import nmap

I installed nmap and python, and when I use import nmap there is no any problem. But when us

8条回答
  •  隐瞒了意图╮
    2020-12-18 04:51

    For Windows users:

    I would suggest first closing all terminals and IDLE or any other window you currently have opened when trying to run your script.

    Next, open a command line and type

    pip uninstall python-nmap
    

    If you are unsure if Nmap binaries are installed on your current system, do a simple search for

    nmap
    

    from your start menu. If it is installed, continue to the next step, if not, go to Nmap's official download page

    Download the windows self install and run it. Record the directory it is being installed to.

    Go to that directory. For me it was

    C:\Program Files (x86)\Nmap

    Open your system's environment variables editor usually found in

    My PC > System Information > Advance settings > Environment Variables
    

    Or right click

    My PC or My Computer or whatever yours is called and select properties then advance settings then Environment Variables at the bottom of the Advanced tab

    select Path for both You and the System

    press Edit and enter the full path to your Nmap director

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

    Press ok and exit the editor.

    Now go back to your command line and enter: pip install python-nmap Allow it to install and then restart your ide and test your code again.

提交回复
热议问题