简体   繁体   English

如何为64位Windows和Python 2.7安装ZBar?

[英]How to install ZBar for 64-bit Windows and Python 2.7?

I'm trying to use the zbar library with Python 2.7 and Windows 64-bit, but there are no readily made .exe installations. 我正在尝试使用带有Python 2.7和Windows 64位的zbar库,但是没有很容易制作的.exe安装。

I'm fairly new to "making the build" myself. 我自己也很擅长“制作”。 What are the steps? 步骤是什么?

I have not found for 64-bit but you can run Python 2.7 32-bit on a 64-bit machine and use the installer found here. 我没有找到64位但你可以在64位机器上运行Python 2.7 32位并使用此处的安装程序。

http://www.4shared.com/file/Zg8oJ9-g/zbar-010win32-py27_2.html http://www.4shared.com/file/Zg8oJ9-g/zbar-010win32-py27_2.html

I'm aware this does not directly answer the question, but if you run into insurmountable problems with the build process on Windows then you may wish to look at simply running Zbar command line calls via subprocess ( http://docs.python.org/2/library/subprocess.html ). 我知道这并没有直接回答这个问题,但是如果你遇到了Windows上构建过程中难以解决的问题,那么你可能希望看看只是通过子进程运行Zbar命令行调用( http://docs.python.org /2/library/subprocess.html )。

At the very basic level you can do something such as: 在最基本的层面上,您可以执行以下操作:

import subprocess
subprocess.check_output(["C:\\Program Files (x86)\\ZBar\\bin\\zbarimg","-q",     "E:\path-to-files\QR_image.png"])

Depending on your situation, it might beat downloading an installer from a potentially questionable site. 根据您的具体情况,可能会从可疑的网站上下载安装程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM