Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
This is pymouse’s pot
The solution is to find the installation path of pymouse. If you don’t know where to install it with PIP, you will be automatically prompted for the installation path if it has already been installed. It is usually in the Lib/site packages of Python or IDE, for example, mine is in F:// anacondea/lib/site packages
Open the installation path of pymouse__ init__. Py file; Change line 92 of windows to pymouse. Windows
After this change, you should be prompted another and error
ModuleNotFoundError: No module named ‘pyHook’
Now you need to install pyhook. It is recommended to download WHL file for installation https://www.lfd.uci.edu/~gohlke/pythonlibs/ Download here
Put the downloaded files in the scripts folder. For example, my file is f:// anacondea/scripts. And then
pip installpyHook‑1.5.1‑cp37‑cp37m‑win_ amd64.whl
If there is no accident, it can be installed successfully. Of course, the premise is to select the corresponding 64/32-bit version
After installation, if you import pymouse and pykeyboard still report an error, it is normal
You need PIP installpyuserinput
Because pyuserinput needs to install pywin32 and pyhook modules
Pywin32 is installed by default. If not, you can PIP install what you need again
If no module named ‘win32API’ reports an error:
Open the terminal (Windows + R)
PIP install pypiwin32
original link: https://blog.csdn.net/qq_ 34696203/article/details/83029114, https://blog.csdn.net/qq_ 41810188/article/details/90641547