Python Forum
Trying to use python-nmap but receiving however python2 or 3 can't find PortScanner.
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to use python-nmap but receiving however python2 or 3 can't find PortScanner.
#16
from .nmap import nmap
that doesn't look right
if you look at the source code, it's

from .nmap import *
and it's even more strange because you should get
Error:
ImportError: cannot import name 'nmap' from 'nmap.nmap'
python-nmap works with python3 - I installed it on my system (linux mint) in virtual environment and I got the same error you got in python2
Error:
nmap.nmap.PortScannerError: 'nmap program was not found in path
I don't have nmap installed on my systems, so it's not available

(Jan-19-2020, 06:54 PM)PythonNmap Wrote: Tried to install python3-nmap, since python3 is the future:
python3-nmap is different package, I didn't look into it

install separately - that it nmap tool should be available on your system, python-nmap will not install it, you should install it yourself if not available

python-nmap will install correctly depending on the python version in which it is installed. As I said I installed it on my python3.7 without any issues
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: Trying to use python-nmap but receiving however python2 or 3 can't find PortScanner. - by buran - Jan-19-2020, 07:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Receiving this error in my "response" and causes script to return wrong status cubangt 18 2,422 Aug-13-2023, 12:16 AM
Last Post: cubangt
  SMA (simple moving avg) Not receiving Data (stock prices). gdbengo 2 1,538 Jul-31-2022, 08:20 PM
Last Post: paulyan
  Receiving snmp traps with more than one Community String ilknurg 0 2,372 Jan-19-2022, 09:02 AM
Last Post: ilknurg
  [Selenium]Timed out receiving message from renderer: 10.000 wood_6636 0 2,743 Jun-26-2020, 08:59 AM
Last Post: wood_6636
  output mismatching when porting a python from python2 env to python3 env prayuktibid 2 2,692 Jan-21-2020, 04:41 AM
Last Post: prayuktibid
  Receiving XML exception from nmap.scan() results. PythonNmap 4 4,269 Jan-21-2020, 04:41 AM
Last Post: PythonNmap
  First Byte of a string is missing while receiving data over TCP Socket shahrukh1987 3 4,377 Nov-20-2019, 10:34 AM
Last Post: shahrukh1987
  Trying to run a python2 script dagamer1991 3 2,639 Aug-12-2019, 12:33 PM
Last Post: buran
  Use nmap inside my python code to get supported cipher suites jimmeh 4 5,396 May-30-2019, 01:07 PM
Last Post: jimmeh
  python2.7 executables thus the system python2.7 was erroring utility.execute()? vivekm 1 1,840 May-20-2019, 11:24 AM
Last Post: vivekm

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020