Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why wont this work?
#1
Microsoft Windows [Version 10.0.17134.648]
(c) 2018 Microsoft Corporation. All rights reserved.

(venv) C:\Users\Mario\PycharmProjects\New Project 1>pip3 install nmap
Requirement already satisfied: nmap in c:\users\mario\pycharmprojects\new project 1\venv\lib\site-packages (0.0.1)
You are using pip version 10.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I'm trying to use nmap in a python script. When I try to install it, it says that I already have nmap installed... So it should work in my python script right? But it's not working. I get this error when I try to use nmap in a script:

(I have "import nmap" at the top of the script)

"C:\Users\Mario\PycharmProjects\New Project 1\venv\Scripts\python.exe" "C:/Users/Mario/PycharmProjects/New Project 1/script.py"
Traceback (most recent call last):
  File "C:/Users/Mario/PycharmProjects/New Project 1/script.py", line 3, in <module>
    ns = nmap.PortScanner()
AttributeError: module 'nmap' has no attribute 'PortScanner'

Process finished with exit code 1
Reply


Messages In This Thread
Why wont this work? - by ejected - Mar-29-2019, 12:16 AM
RE: Why wont this work? - by ejected - Mar-29-2019, 01:30 AM
RE: Why wont this work? - by snippsat - Mar-29-2019, 05:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Why wont this path work one way, but will the other way? cubangt 2 688 Sep-01-2023, 04:14 PM
Last Post: cubangt
  Why wont subprocess call work? steve_shambles 3 2,694 Apr-28-2020, 03:06 PM
Last Post: steve_shambles
  When I import a Module it wont run PyNovice 17 6,442 Oct-26-2019, 11:14 AM
Last Post: PyNovice
  wont print last sentence.. mitmit293 2 2,403 Jan-27-2019, 05:38 PM
Last Post: aakashjha001
  Why wont this work :( Nonagon 2 3,030 Nov-03-2018, 03:38 AM
Last Post: wavic
  Boolean Wont Work fierygaming 5 4,244 Jun-13-2018, 07:49 PM
Last Post: fierygaming
  Reddit Bot comes up with no errors but wont actually run Rubix3D 0 2,629 Jan-12-2018, 12:53 AM
Last Post: Rubix3D

Forum Jump:

User Panel Messages

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