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
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.