注意:
我只想要pyhook 64位这就是为什么要做这一切因为无法找到任何 Windows Link的64位版本在互联网上提到的就是这个 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