0

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 :-(

Community
  • 1
  • 1
  • Have you tried `import pyWinhook` as that is what you have installed? – FlyingTeller Oct 30 '19 at 15:12
  • I have another problem. I am trying to design a keylogger. I referred this site : [link](https://www.geeksforgeeks.org/design-a-keylogger-in-python/) I do not know which lines should I change. I have `x64 bit OS` Copying this code causes a lot of Errors. Can you help me out please – Ajinkya Rathod Nov 01 '19 at 07:09
  • This should be a new question. Please create one with the appropriate tags. You add a link in the comments here if you want, then I can take a look – FlyingTeller Nov 01 '19 at 09:42

1 Answers1

1

Write pip3 install pynput in cmd

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

Both works same

ajinzrathod
  • 925
  • 10
  • 28