无法在Windows 10上安装ZBar for Python 2.7.9:zbar.h中的错误
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了无法在Windows 10上安装ZBar for Python 2.7.9:zbar.h中的错误相关的知识,希望对你有一定的参考价值。
我正在尝试在我的计算机上安装ZBar,从命令窗口运行pip install zbar
(作为管理员)。但是,我不断收到以下错误:
zbarmodule.c
C:Python27includezbar.h(685) : error C2054: expected '(' to follow 'inline'
C:Python27includezbar.h(687) : error C2085: 'zbar_processor_parse_config' : not in formal parameter list
C:Python27includezbar.h(687) : error C2143: syntax error : missing ';' before '{'
C:Python27includezbar.h(761) : error C2054: expected '(' to follow 'inline'
C:Python27includezbar.h(763) : error C2085: 'zbar_processor_error_spew' : not in formal parameter list
C:Python27includezbar.h(763) : error C2143: syntax error : missing ';' before '{'
C:Python27includezbar.h(768) : error C2143: syntax error : missing '{' before 'const'
C:Python27includezbar.h(777) : error C2054: expected '(' to follow 'inline'
C:Python27includezbar.h(778) : error C2085: 'zbar_processor_get_error_code' : not in formal parameter list
C:Python27includezbar.h(778) : error C2143: syntax error : missing ';' before '{'
C:Python27includezbar.h(882) : error C2054: expected '(' to follow 'inline'
C:Python27includezbar.h(884) : error C2085: 'zbar_video_error_spew' : not in formal parameter list
C:Python27includezbar.h(884) : error C2143: syntax error : missing ';' before '{'
C:Python27includezbar.h(889) : error C2143: syntax error : missing '{' before 'const'
C:Python27includezbar.h(897) : error C2054: expected '(' to follow 'inline'
C:Python27includezbar.h(898) : error C2085: 'zbar_video_get_error_code' : not in formal parameter list
C:Python27includezbar.h(898) : error C2143: syntax error : missing ';' before '{'
C:Python27includezbar.h(968) : error C2054: expected '(' to follow 'inline'
C:Python27includezbar.h(970) : error C2085: 'zbar_window_error_spew' : not in formal parameter list
C:Python27includezbar.h(970) : error C2143: syntax error : missing ';' before '{'
C:Python27includezbar.h(975) : error C2143: syntax error : missing '{' before 'const'
C:Python27includezbar.h(984) : error C2054: expected '(' to follow 'inline'
C:Python27includezbar.h(985) : error C2085: 'zbar_window_get_error_code' : not in formal parameter list
C:Python27includezbar.h(985) : error C2143: syntax error : missing ';' before '{'
C:Python27includezbar.h(1050) : error C2054: expected '(' to follow 'inline'
C:Python27includezbar.h(1052) : error C2085: 'zbar_image_scanner_parse_config' : not in formal parameter list
C:Python27includezbar.h(1052) : error C2143: syntax error : missing ';' before '{'
C:Python27includezbar.h(1141) : error C2054: expected '(' to follow 'inline'
C:Python27includezbar.h(1143) : error C2085: 'zbar_decoder_parse_config' : not in formal parameter list
C:Python27includezbar.h(1143) : error C2143: syntax error : missing ';' before '{'
C:Python27includezbar.h(1276) : error C2054: expected '(' to follow 'inline'
C:Python27includezbar.h(1278) : error C2085: 'zbar_scan_rgb24' : not in formal parameter list
C:Python27includezbar.h(1278) : error C2143: syntax error : missing ';' before '{'
zbarmodule.c(65) : error C2143: syntax error : missing ';' before 'type'
zbarmodule.c(66) : error C2065: 'major' : undeclared identifier
zbarmodule.c(66) : error C2065: 'minor' : undeclared identifier
zbarmodule.c(68) : error C2065: 'major' : undeclared identifier
zbarmodule.c(68) : error C2065: 'minor' : undeclared identifier
zbarmodule.c(133) : error C2275: 'zbar_error_t' : illegal use of this type as an expression
C:Python27includezbar.h(121) : see declaration of 'zbar_error_t'
zbarmodule.c(133) : error C2146: syntax error : missing ';' before identifier 'ei'
zbarmodule.c(133) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(134) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(134) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(134) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(135) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(135) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(136) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(146) : error C2275: 'PyObject' : illegal use of this type as an expression
c:python27includeobject.h(108) : see declaration of 'PyObject'
zbarmodule.c(146) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(147) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(151) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(151) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(151) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
zbarmodule.c(152) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(152) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(152) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
zbarmodule.c(153) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(153) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(153) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
zbarmodule.c(154) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(154) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(154) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
zbarmodule.c(155) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(155) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(155) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
zbarmodule.c(156) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(156) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(156) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
zbarmodule.c(157) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(157) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(157) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
zbarmodule.c(158) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(158) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(158) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
zbarmodule.c(159) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(159) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(159) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
zbarmodule.c(160) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(160) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(160) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
zbarmodule.c(162) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(162) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(162) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(163) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(164) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(164) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(164) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
zbarmodule.c(164) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(164) : error C2065: 'ei' : undeclared identifier
zbarmodule.c(167) : error C2275: 'PyObject' : illegal use of this type as an expression
c:python27includeobject.h(108) : see declaration of 'PyObject'
zbarmodule.c(167) : error C2065: 'dict' : undeclared identifier
zbarmodule.c(167) : error C2065: 'mod' : undeclared identifier
zbarmodule.c(167) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(167) : warning C4024: 'PyModule_GetDict' : different types for formal and actual parameter 1
zbarmodule.c(169) : error C2065: 'dict' : undeclared identifier
zbarmodule.c(169) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(169) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(171) : error C2065: 'dict' : undeclared identifier
zbarmodule.c(171) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(171) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(183) : error C2275: 'PyObject' : illegal use of this type as an expression
c:python27includeobject.h(108) : see declaration of 'PyObject'
zbarmodule.c(183) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(185) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(185) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(185) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(186) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(186) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(186) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(187) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(187) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(187) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(188) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(188) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(188) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(189) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(189) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(189) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(190) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(190) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(190) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(191) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(191) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(191) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(192) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(192) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(192) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(193) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(193) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(193) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(194) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(194) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(194) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(195) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(195) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(195) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(196) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(196) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(196) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
zbarmodule.c(197) : error C2065: 'tp_dict' : undeclared identifier
zbarmodule.c(197) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
zbarmodule.c(197) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
error: command 'C:\Users\Userzzz\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2
我没有写过zbar.h文件,所以我不确定我是如何修复这些错误的。有人可以帮帮我吗?
答案
尝试使用从https://github.com/jacobvalenta/zbar-py27-msi下载的可执行文件安装它
以上是关于无法在Windows 10上安装ZBar for Python 2.7.9:zbar.h中的错误的主要内容,如果未能解决你的问题,请参考以下文章
Python 安装zbar-py时出现 无法打开包括文件: “unistd.h” no such file or directory
无法在 Git for Windows 10 中永久设置 GIT_SSH 变量
win10安装安卓子系统android13肯定成功Windows Subsystem for Android(WSA)install 无法定位程序输入点ucal_getHostTimeZone 无网络