python 3.5上的PyHook

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35202087/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 16:08:01  来源:igfitidea点击:

PyHook on python 3.5

pythonmodulepyhook

提问by Vladamir

I am trying to write a basic keylogging program on python. I need to install the pywin32 and pyhook modules. I have managed to get pywin32 installed, but cannot seem to pyhook to work. I have read its possible to get it to work on later versions of python, but cannot seem to figure it out. I have tried both .exe and .whl installs. Using whl in cmd gives error that the wheel is not supported. Does anyone have a solution to install pyhook on python 3.5. Thanks

我正在尝试在 python 上编写一个基本的键盘记录程序。我需要安装 pywin32 和 pyhook 模块。我已经设法安装了 pywin32,但似乎无法使用 pyhook 工作。我已经阅读了让它在更高版本的 python 上工作的可能性,但似乎无法弄清楚。我已经尝试过 .exe 和 .whl 安装。在 cmd 中使用 whl 会出现不支持轮子的错误。有没有人有在python 3.5上安装pyhook的解决方案。谢谢

回答by staad

This is how I did it...

我就是这样做的...

  1. Download the py hook module that matches your version of python from here. Make sure that if you have python 32 bit you download the 32 bit module (even if you have windows 64x) and vice versa.

  2. Open your command prompt and navigate to the folder where you downloaded the module

  3. Type "pip install " and then the name of the file.

    Ex: "pip install pyHook-1.5.1-cp27-none-win32.whl"

  1. 这里下载与您的 python 版本匹配的 py hook 模块。确保如果你有 python 32 位,你下载 32 位模块(即使你有 windows 64x),反之亦然

  2. 打开命令提示符并导航到下载模块的文件夹

  3. 输入“pip install”,然后输入文件名。

    例如:“pip install pyHook-1.5.1-cp27-none-win32.whl”

Note : you need pip

注意:你需要点子

回答by Fenx

If your pip install have not success. Try -> when you download a pyHook-1.5.1-cp27-none-win32.whl file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyhookAfter that move file to Programs\Python\Python35-32\Scripts path and then pip install pyHook-1.5.1-cp27-none-win32.whl I hope my answer is useful for you.

如果您的 pip 安装没有成功。尝试 -> 当您从http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyhook下载 pyHook-1.5.1-cp27-none-win32.whl 文件 后,将文件移动到 Programs\Python\ Python35-32\Scripts path 然后pip install pyHook-1.5.1-cp27-none-win32.whl 希望我的回答对你有用。