笔记 :
我只想要 pyhook 64 位,这就是为什么要做这一切,因为在互联网上找不到任何 64 位版本的 Windows Link 是这个 http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyhook但我从这里找不到只有 .whl pakages 几个 .exe 但不是 pyhook
我尝试使用默认编译器设置(即 vs)来构建它,但它给出了错误“无法找到 vcvarsall.bat”我已将此添加到系统变量中,但仍然显示错误。
C:\Python27\pyHook-1.5.1>dir
Volume in drive C is Window.!
Volume Serial Number is FE06-94AB
Directory of C:\Python27\pyHook-1.5.1
09/08/2015 02:32 AM <DIR> .
09/08/2015 02:32 AM <DIR> ..
02/23/2005 04:57 PM 1,761 aa hook.py
09/08/2015 02:43 AM <DIR> build
10/05/2008 09:47 PM 1,158 CHANGELOG.txt
10/05/2008 09:33 PM 8,614 cpyHook.i
09/08/2015 04:54 AM 2,934 cpyHook.py
09/08/2015 04:54 AM 128,186 cpyHook_wrap.c
02/23/2005 04:57 PM 302 doc.py
02/23/2005 04:57 PM 1,396 example.py
07/22/2008 08:09 PM 23,787 HookManager.py
12/05/2003 10:35 AM 1,064 LICENSE.txt
10/05/2008 09:43 PM 221 MANIFEST.in
10/05/2008 09:48 PM 1,172 PKG-INFO
10/07/2008 11:36 PM 842 README.txt
10/05/2008 09:36 PM 1,646 setup.py
09/13/2004 01:40 PM 25 __init__.py
14 File(s) 173,108 bytes
3 Dir(s) 43,204,739,072 bytes free
C:\Python27\pyHook-1.5.1>python setup.py build
running build
running build_py
copying cpyHook.py -> build\lib.win-amd64-2.7\pyHook
running build_ext
building 'pyHook._cpyHook' extension
swigging cpyHook.i to cpyHook_wrap.c
C:\swigwin-3.0.7\swig.exe -python -o cpyHook_wrap.c cpyHook.i
error: Unable to find vcvarsall.bat
然后我在这里搜索了以前的答案,发现我也可以使用其他编译器,所以我使用了mingw它也显示错误
C:\Python27\pyHook-1.5.1>python setup.py build --compiler=mingw32
running build
running build_py
copying cpyHook.py -> build\lib.win-amd64-2.7\pyHook
running build_ext
building 'pyHook._cpyHook' extension
swigging cpyHook.i to cpyHook_wrap.c
C:\swigwin-3.0.7\swig.exe -python -o cpyHook_wrap.c cpyHook.i
C:\Program Files\mingw-w64\x86_64-5.1.0-posix-seh-rt_v4-rev0\mingw64\bin\gcc.exe
-mno-cygwin -mdll -O -Wall -IC:\Python27\include -IC:\Python27\PC -c cpyHook_wr
ap.c -o build\temp.win-amd64-2.7\Release\cpyhook_wrap.o
gcc: error: unrecognized command line option '-mno-cygwin'
error: command 'C:\\Program Files\\mingw-w64\\x86_64-5.1.0-posix-seh-rt_v4-rev0\
\mingw64\\bin\\gcc.exe' failed with exit status 1