Skip to content Skip to sidebar Skip to footer

Modulenotfounderror: No Module Named 'windows'

I'm working on a project and I need to use the PyMouse module. pip install pymouse installed pymouse correctly, so I assumed all was fine. However, when importing PyMouse: from py

Solution 1:

I had I look into this and became puzzled at first, so looked deeper. It turns out that pymouse is absolutely full of errors. More that I bothered to find. The error you got is just one of many errors caused by bad coding.

The code says:

from windows importPyMouse, PyMouseEvent

And it should say:

from .windowsimportPyMouse, PyMouseEvent

Also, PyUserInput, a sister package that is free from the pymouse errors, requires pyhook, which is unsupported by python 3. After a lot of looking around, the conclusion that there is no way around the problems found, except maybe installing a really early version.

You could also try the keyboard module.

Solution 2:

You might want to take a look at pynput module. It works on python 3.8, doesn't have any incompatible dependencies, and doesn't seem to have any errors. Once you have the module installed, this page gives some good examples of various ways to manage the mouse.

Post a Comment for "Modulenotfounderror: No Module Named 'windows'"