Hi,
I am pretty new with python and I have some difficulties in installing this package. I am under windows 7 64bit. I have downloaded the zbar-0.10 and unzipped it. Then from the cmd line once place inside the correct directory I have entered python setup.py install.
At this point I got an error message:
"
C:\…\pythonxy\Python26\Lib\site-packages\zbar-0.10>python setup.py install
running install
running build
running build_ext
building 'zbar' extension
error: Unable to find vcvarsall.bat
"
Can you guide me through what I should do to succeed installing zbar?
If any info is missing I'll be happy to provide it
Thx for your help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You should probably place the package source outside the python library tree (eg, in \Temp\). Setup will install the necessary files in the correct location.
> error: Unable to find vcvarsall.bat
If you want to build the python extension module from source, you will need a C compiler, probably MSVC, which is available from your OS vendor.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your answer, but I still on't manage tod install it. I have changed my folder & installed MinGW but it doesn't seems to make any difference as I still get the same message.
I have then tryed to specify which compiler to use but I still get an error message:
"
C:\temporaireJ\zbar-0.10>python setup.py build -compiler=mingw32
running build
running build_ext
building 'zbar' extension
C:\Program Files (x86)\pythonxy\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC
:\Python26\include -IC:\Python26\PC -c zbarmodule.c -o build\temp.win32-2.6\Rele
ase\zbarmodule.o
In file included from zbarmodule.c:24:
zbarmodule.h:26:18: error: zbar.h: No such file or directory
In file included from zbarmodule.c:24:
zbarmodule.h:37: error: 'ZBAR_ERR_NUM' undeclared here (not in a function)
zbarmodule.h:67: error: expected specifier-qualifier-list before 'zbar_image_t'
zbarmodule.h:73: error: expected ')' before '*' token
zbarmodule.h:78: error: expected ':', ',', ';', '}' or '__attribute__' before '*
' token
zbarmodule.h:84: warning: type defaults to 'int' in declaration of 'zbar_symbol_
set_t'
zbarmodule.h:84: error: expected ';', ',' or ')' before '*' token
zbarmodule.h:90: error: expected ':', ',', ';', '}' or '__attribute__' before '*
' token
zbarmodule.h:97: warning: type defaults to 'int' in declaration of 'zbar_symbol_
t'
zbarmodule.h:97: error: expected ';', ',' or ')' before '*' token
zbarmodule.h:98: error: expected ')' before 'type'
zbarmodule.h:102: error: expected ':', ',', ';', '}' or '__attribute__' before '
*' token
zbarmodule.h:112: error: expected specifier-qualifier-list before 'zbar_processo
r_t'
zbarmodule.h:123: error: expected specifier-qualifier-list before 'zbar_image_sc
anner_t'
zbarmodule.h:130: error: expected specifier-qualifier-list before 'zbar_decoder_
t'
zbarmodule.h:139: error: expected specifier-qualifier-list before 'zbar_scanner_
t'
zbarmodule.c: In function 'version':
zbarmodule.c:66: warning: implicit declaration of function 'zbar_version'
zbarmodule.c: In function 'set_verbosity':
zbarmodule.c:79: warning: implicit declaration of function 'zbar_set_verbosity'
zbarmodule.c: In function 'increase_verbosity':
zbarmodule.c:92: warning: implicit declaration of function 'zbar_increase_verbos
ity'
zbarmodule.c: In function 'initzbar':
zbarmodule.c:132: error: 'ZBAR_ERR_NOMEM' undeclared (first use in this function
)
zbarmodule.c:132: error: (Each undeclared identifier is reported only once
zbarmodule.c:132: error: for each function it appears in.)
zbarmodule.c:133: error: 'zbar_error_t' undeclared (first use in this function)
zbarmodule.c:133: error: expected ';' before 'ei'
zbarmodule.c:134: error: 'ei' undeclared (first use in this function)
zbarmodule.c:134: error: 'ZBAR_ERR_INTERNAL' undeclared (first use in this funct
ion)
zbarmodule.c:168: error: 'ZBAR_SPACE' undeclared (first use in this function)
zbarmodule.c:170: error: 'ZBAR_BAR' undeclared (first use in this function)
zbarmodule.c:173: error: 'ZBAR_CFG_ENABLE' undeclared (first use in this functio
n)
zbarmodule.c:174: error: 'ZBAR_CFG_ADD_CHECK' undeclared (first use in this func
tion)
zbarmodule.c:175: error: 'ZBAR_CFG_EMIT_CHECK' undeclared (first use in this fun
ction)
zbarmodule.c:176: error: 'ZBAR_CFG_ASCII' undeclared (first use in this function
)
zbarmodule.c:177: error: 'ZBAR_CFG_MIN_LEN' undeclared (first use in this functi
on)
zbarmodule.c:178: error: 'ZBAR_CFG_MAX_LEN' undeclared (first use in this functi
on)
zbarmodule.c:179: error: 'ZBAR_CFG_X_DENSITY' undeclared (first use in this func
tion)
zbarmodule.c:181: error: 'ZBAR_CFG_Y_DENSITY' undeclared (first use in this func
tion)
zbarmodule.c:185: error: 'ZBAR_NONE' undeclared (first use in this function)
zbarmodule.c:186: error: 'ZBAR_PARTIAL' undeclared (first use in this function)
zbarmodule.c:187: error: 'ZBAR_EAN8' undeclared (first use in this function)
zbarmodule.c:188: error: 'ZBAR_UPCE' undeclared (first use in this function)
zbarmodule.c:189: error: 'ZBAR_ISBN10' undeclared (first use in this function)
zbarmodule.c:190: error: 'ZBAR_UPCA' undeclared (first use in this function)
zbarmodule.c:191: error: 'ZBAR_EAN13' undeclared (first use in this function)
zbarmodule.c:192: error: 'ZBAR_ISBN13' undeclared (first use in this function)
zbarmodule.c:193: error: 'ZBAR_I25' undeclared (first use in this function)
zbarmodule.c:194: error: 'ZBAR_CODE39' undeclared (first use in this function)
zbarmodule.c:195: error: 'ZBAR_PDF417' undeclared (first use in this function)
zbarmodule.c:196: error: 'ZBAR_QRCODE' undeclared (first use in this function)
zbarmodule.c:197: error: 'ZBAR_CODE128' undeclared (first use in this function)
error: command 'gcc' failed with exit status 1
"
thx again
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> zbarmodule.h:26:18: error: zbar.h: No such file or directory
In order to build against the library, you must have installed ZBar with development files and will likely need to point setup.py to the dev file locations. I don't remember exact windows details, but something along these lines:
Hi,
I am pretty new with python and I have some difficulties in installing this package. I am under windows 7 64bit. I have downloaded the zbar-0.10 and unzipped it. Then from the cmd line once place inside the correct directory I have entered python setup.py install.
At this point I got an error message:
"
C:\…\pythonxy\Python26\Lib\site-packages\zbar-0.10>python setup.py install
running install
running build
running build_ext
building 'zbar' extension
error: Unable to find vcvarsall.bat
"
Can you guide me through what I should do to succeed installing zbar?
If any info is missing I'll be happy to provide it
Thx for your help
First, note that there are windows binary installers available on pypi; not sure if those would work better for you.
> C:\…\pythonxy\Python26\Lib\site-packages\zbar-0.10>
You should probably place the package source outside the python library tree (eg, in \Temp\). Setup will install the necessary files in the correct location.
> error: Unable to find vcvarsall.bat
If you want to build the python extension module from source, you will need a C compiler, probably MSVC, which is available from your OS vendor.
Thanks for your answer, but I still on't manage tod install it. I have changed my folder & installed MinGW but it doesn't seems to make any difference as I still get the same message.
I have then tryed to specify which compiler to use but I still get an error message:
"
C:\temporaireJ\zbar-0.10>python setup.py build -compiler=mingw32
running build
running build_ext
building 'zbar' extension
C:\Program Files (x86)\pythonxy\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC
:\Python26\include -IC:\Python26\PC -c zbarmodule.c -o build\temp.win32-2.6\Rele
ase\zbarmodule.o
In file included from zbarmodule.c:24:
zbarmodule.h:26:18: error: zbar.h: No such file or directory
In file included from zbarmodule.c:24:
zbarmodule.h:37: error: 'ZBAR_ERR_NUM' undeclared here (not in a function)
zbarmodule.h:67: error: expected specifier-qualifier-list before 'zbar_image_t'
zbarmodule.h:73: error: expected ')' before '*' token
zbarmodule.h:78: error: expected ':', ',', ';', '}' or '__attribute__' before '*
' token
zbarmodule.h:84: warning: type defaults to 'int' in declaration of 'zbar_symbol_
set_t'
zbarmodule.h:84: error: expected ';', ',' or ')' before '*' token
zbarmodule.h:90: error: expected ':', ',', ';', '}' or '__attribute__' before '*
' token
zbarmodule.h:97: warning: type defaults to 'int' in declaration of 'zbar_symbol_
t'
zbarmodule.h:97: error: expected ';', ',' or ')' before '*' token
zbarmodule.h:98: error: expected ')' before 'type'
zbarmodule.h:102: error: expected ':', ',', ';', '}' or '__attribute__' before '
*' token
zbarmodule.h:112: error: expected specifier-qualifier-list before 'zbar_processo
r_t'
zbarmodule.h:123: error: expected specifier-qualifier-list before 'zbar_image_sc
anner_t'
zbarmodule.h:130: error: expected specifier-qualifier-list before 'zbar_decoder_
t'
zbarmodule.h:139: error: expected specifier-qualifier-list before 'zbar_scanner_
t'
zbarmodule.c: In function 'version':
zbarmodule.c:66: warning: implicit declaration of function 'zbar_version'
zbarmodule.c: In function 'set_verbosity':
zbarmodule.c:79: warning: implicit declaration of function 'zbar_set_verbosity'
zbarmodule.c: In function 'increase_verbosity':
zbarmodule.c:92: warning: implicit declaration of function 'zbar_increase_verbos
ity'
zbarmodule.c: In function 'initzbar':
zbarmodule.c:132: error: 'ZBAR_ERR_NOMEM' undeclared (first use in this function
)
zbarmodule.c:132: error: (Each undeclared identifier is reported only once
zbarmodule.c:132: error: for each function it appears in.)
zbarmodule.c:133: error: 'zbar_error_t' undeclared (first use in this function)
zbarmodule.c:133: error: expected ';' before 'ei'
zbarmodule.c:134: error: 'ei' undeclared (first use in this function)
zbarmodule.c:134: error: 'ZBAR_ERR_INTERNAL' undeclared (first use in this funct
ion)
zbarmodule.c:168: error: 'ZBAR_SPACE' undeclared (first use in this function)
zbarmodule.c:170: error: 'ZBAR_BAR' undeclared (first use in this function)
zbarmodule.c:173: error: 'ZBAR_CFG_ENABLE' undeclared (first use in this functio
n)
zbarmodule.c:174: error: 'ZBAR_CFG_ADD_CHECK' undeclared (first use in this func
tion)
zbarmodule.c:175: error: 'ZBAR_CFG_EMIT_CHECK' undeclared (first use in this fun
ction)
zbarmodule.c:176: error: 'ZBAR_CFG_ASCII' undeclared (first use in this function
)
zbarmodule.c:177: error: 'ZBAR_CFG_MIN_LEN' undeclared (first use in this functi
on)
zbarmodule.c:178: error: 'ZBAR_CFG_MAX_LEN' undeclared (first use in this functi
on)
zbarmodule.c:179: error: 'ZBAR_CFG_X_DENSITY' undeclared (first use in this func
tion)
zbarmodule.c:181: error: 'ZBAR_CFG_Y_DENSITY' undeclared (first use in this func
tion)
zbarmodule.c:185: error: 'ZBAR_NONE' undeclared (first use in this function)
zbarmodule.c:186: error: 'ZBAR_PARTIAL' undeclared (first use in this function)
zbarmodule.c:187: error: 'ZBAR_EAN8' undeclared (first use in this function)
zbarmodule.c:188: error: 'ZBAR_UPCE' undeclared (first use in this function)
zbarmodule.c:189: error: 'ZBAR_ISBN10' undeclared (first use in this function)
zbarmodule.c:190: error: 'ZBAR_UPCA' undeclared (first use in this function)
zbarmodule.c:191: error: 'ZBAR_EAN13' undeclared (first use in this function)
zbarmodule.c:192: error: 'ZBAR_ISBN13' undeclared (first use in this function)
zbarmodule.c:193: error: 'ZBAR_I25' undeclared (first use in this function)
zbarmodule.c:194: error: 'ZBAR_CODE39' undeclared (first use in this function)
zbarmodule.c:195: error: 'ZBAR_PDF417' undeclared (first use in this function)
zbarmodule.c:196: error: 'ZBAR_QRCODE' undeclared (first use in this function)
zbarmodule.c:197: error: 'ZBAR_CODE128' undeclared (first use in this function)
error: command 'gcc' failed with exit status 1
"
thx again
> zbarmodule.h:26:18: error: zbar.h: No such file or directory
In order to build against the library, you must have installed ZBar with development files and will likely need to point setup.py to the dev file locations. I don't remember exact windows details, but something along these lines:
Does it would be possible to go pure python? and drop windows related stuff?
tkinter would allow pretty GUI for full Pledged Application.