简体   繁体   中英

import pyHook. ModuleNotFoundError: No module named 'pyHook'

I am using Python3.8.0 , my PC is x64 bit and my code starts as:

import pyHook

When I run the program, it shows:

Traceback (most recent call last):

File "abc.py", line 1, in

import pyHook

ModuleNotFoundError: No module named 'pyHook'

I have already installed Pyhook and I have verified it in cmd by writing the following code

python -m pip install pyWinhook-1.6.1-cp38-cp38-win_amd64.whl

Output:

Requirement already satisfied

I visited these links, but it did not helped: Getting "ModuleNotFoundError: No module named 'pyHook'" even with module installed

This link PyHook on python 3.5 says that I should Install pyhook32 even if I have 64bit. I tried that and cmd does'nt allow system to install that.

Anyone have any other idea? Please help me if I am doing anything wrong:-(

Write pip3 install pynput in cmd

Now in your python code, remove import pyHook and write import pynput

Both works same

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM