2015-09-07 6 views
5

Ich habe pyHook für meine Windows 64 Bit installiert.Das Setup hat es in C: \ Python27 \ Lib \ Site-Pakete installiert dir kann ich nicht pyhook importieren (ich kann Win32 named Ordner dort denke, es ist es sehen Ordner) in meinem Code, was ich tun soll, Hier Dolmetscher AusgabeImport pyHook fehlgeschlagen

>>> 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 
>>> 
+0

Was sagt 'sys' und dann' sys.path'? Sind C: \ Python27 \ Lib \ Site-Pakete dort aufgeführt? – haraldkl

+0

Python 2.7.10 (Standard, 23. Mai 2015, 09:44:00) [MSC v.1500 64 Bit (AMD64)] unter wi n32 Geben Sie "Hilfe", "Copyright", "Kredite" oder "Lizenz" ein für mehr Informationen. >>> import sys >>> sys.path ['', 'C: \\ Windows \\ SYSTEM32 \\ python27.zip', 'C: \\ Python27 \\ DLLs', 'C: \\ Python27 \ \ lib ',' C: \\ Python27 \\ lib \\ plat-win ',' C: \\ Python27 \\ lib \\ lib-tk ',' C: \\ Python27 ',' C : \\ Python27 \\ lib \\ site-packages ',' C: \\ Python27 \\ lib \ site-packages \\ win32 ' ,' C: \\ Python27 \\ lib \\ site-packages \\ win32 \\ lib ',' C: \\ Python27 \\ lib \\ site-packa ges \\ Pythonwin '] >>> Ja, es gibt –

+0

Wie hast du pyHook auf 64-Bit Python installiert? Es scheint, dass der neueste Build nur 32-Bit-Installer hat: https://sourceforge.net/projects/pyhook/files/pyhook/1.5.1/ Hast du es von einer anderen Quelle bekommen? –

Antwort

6

Vor allem win32 ist nicht die pyHook Modul es ein anderes Modul ist.

Hier ist, wie pyHook zu installieren:

1.You den Download-Link finden Sie hier http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyhook

2. Wenn Sie Python 32bit haben Sie 32-Bit (Download # 1 für Python 2.7) pyhook .

3.Wenn Sie Python 64bit haben möchten Sie pyHook 64 Bit (Download # 2 für Python 2.7).

4.Extract der Zip-Datei.

5. Navigieren Sie an der Eingabeaufforderung zu dem Ordner, in den Sie die ZIP-Datei extrahiert haben.

6.Type der Befehl 'pip installieren pyHook-1.5.1-CP27-none-win32.whl' für die 32-Bit-Version oder 'pip pyHook-1.5.1-CP27-none-win_amd64.whl installieren'

Viel Glück!