PyHook import error

I installed pyHook for my 64-bit windows. The setup installed it in C: \ Python27 \ Lib \ site-packages dir I cant import pyhook (I see that the folder named win32 is there so that it is her folder) in my code, what should I do Here is the output of the interpreters

>>> import pyHook Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import pyHook ImportError: No module named pyHook >>> import pyhook Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import pyhook ImportError: No module named pyhook >>> 
+5
source share
1 answer

First of all, win32 is not a pyHook module, it is a different module.

Here's how to install pyHook:

1.You can find the download link here http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyhook

2. If you have 32-bit python, you want 32-bit pyhook (Download # 1 for Python 2.7).

3. If you have 64-bit python, you want a 64-bit pyHook (Download # 2 for Python 2.7).

4. Extract the zip file.

5. At the command prompt, navigate to the folder in which you extracted the .zip.

6. Enter the command 'pip install pyHook-1.5.1-cp27-none-win32.whl' for the 32-bit version or 'pip install pyHook-1.5.1-cp27-none-win_amd64.whl'

Good luck

+6
source

All Articles