0

I am trying to scan my network for connected mac addresses and found that nmap could do the trick. Since I want to monitor connections over time, I want to use my Raspberry Pi which has no use until now to do the task on its own in an interval I don't know yet. I obviously chose Python (which I am new to) to do the tasks I mentioned above.

My Problem begins with installing nmap. I installed it for the Terminal via sudo apt-get install nmap which didn't work well, because it's not a Python module, duh. I then installed nmap-python via sudo apt-get install nmap-python and tried to import it in Python (at first via the shell) with import nmap

which gave me:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import nmap
ImportError: No module named nmap

(same thing for the import via a .py-script)

If I list all my Modules via help('modules'), it shows several modules and one of them is nmap

...what's the problem now? I don't get it. Did I miss something?

1 Answer 1

1

It may come from the version of Python. It's possible that the module nmap-python you installed is for Python 2 and you are using the pyshell for Python 3, or the inverse.

Sign up to request clarification or add additional context in comments.

1 Comment

that was the problem...oh my god - too easy I guess. Thank you very much!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.