[Python] No module named 'pynput'

Discussão em 'Python' iniciado por Stack, Novembro 24, 2025.

  1. Stack

    Stack Membro Participativo

    I am completely new to Python and and still in my babysteps at coding and can't get this thing to work.

    I am trying to build an auto-clicker as a learning experience, so I use pynput:

    from pynput.mouse import Button, Controller
    from pynput.keyboard import Listener, KeyCode


    But I get the error:

    from pynput.mouse import Button, Controller
    ModuleNotFoundError: No module named 'pynput'


    As troubleshooting I again typed in the cmd "pip install pynput" and got:

    Requirement already satisfied: pynput in c:\program files (x86)\python\python37-32\lib\site-packages (1.4)
    Requirement already satisfied: six in c:\program files (x86)\python\python37-32\lib\site-packages (from pynput) (1.12.0)


    Just to be sure, I also tried "pip3 install pynput" with the same result. When I am in the IDLE and type in "import pynput", I get no errors. I only have one python version installed.

    Do you have any ideas what I am still doing wrong?

    I am using Pycharm.

    When I say "pip3 list" in the cmd, I see pynput version 1.4.

    Continue reading...

Compartilhe esta Página