Ho installato pyHook per i miei Windows 64 bit. L'installazione l'ha installato in C: \ Python27 \ Lib \ site-packages dir non posso importare pyhook (posso vedere Win32 cartella denominata lì pensa così è il suo cartella) nel mio codice che cosa devo fare Ecco uscita interpretiimportazione pyHook fallita
>>> 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
>>>
Che cosa significa "importa sys" e "sys.path"? C: \ Python27 \ Lib \ site-packages è elencato qui? – haraldkl
Python 2.7.10 (predefinito, 23 maggio 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] su wi n32 Digitare "help", "copyright", "credits" o "license" per maggiori informazioni. >>> import sys >>> sys.path ['', 'C: \\ Windows \\ SYSTEM32 \\ python27.zip', 'C: \\ Python27 \\ DLL', '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 '] >>> Sì, c'è –
Come hai installato pyHook su Python 64-bit? Sembra che l'ultima build abbia solo installer a 32 bit: https://sourceforge.net/projects/pyhook/files/pyhook/1.5.1/ L'hai presa da un'altra fonte? –