Successfully installed python-nmap but nmap not found on run



goal: run nmap from python3 script

$ sudo pip3 install python-nmap
Successfully installed python-nmap

however when I run script importing nmap

import nmap

I get error:

File “/home/ubuntu/workspace/”, line 3, in
import nmap
File “/home/ubuntu/workspace/”, line 25


SyntaxError: invalid syntax

c9 interpreter is looking in the ubuntu workspace…

How do I force the script to look in or tell c9 where to find nmap?

here is the video