类似于前一篇博文,http://www.cnblogs.com/zhongtang/p/7148082.html中描述的情况。

编译zbarlight同样出现问题,简要处理步骤如下:

1、到https://pypi.python.org/pypi/zbarlight下载源文件。

File Type Py Version Uploaded on Size
zbarlight-1.2.tar.gz (md5) Source   2017-03-09 5KB

2、解压到桌面目录,C:\Users\zou\Desktop\zbarlight\zbarlight-1.2>

修改setup.py文件,增加红色字体三行内容,如下:

    ext_modules=[
Extension(
name=str('zbarlight._zbarlight'),
sources=[str('src/zbarlight/_zbarlight.c')],
extra_compile_args=['-std=c99'],
libraries=['libzbar-0'],
library_dirs= ['C:\Program Files (x86)\ZBar\lib' ] ,
include_dirs = [ 'C:\Program Files (x86)\ZBar\include'
],
optional=os.environ.get('READTHEDOCS', False), # Do not build on Read the Docs
),
],

3、手工编译安装,成功:

C:\Users\zou\Desktop\zbarlight\zbarlight-1.2>python setup.py install
c:\python27\lib\distutils\extension.py:133: UserWarning: Unknown Extension options: 'optional'
warnings.warn(msg)
running install
running bdist_egg
running egg_info
writing requirements to src\zbarlight.egg-info\requires.txt
writing src\zbarlight.egg-info\PKG-INFO
writing top-level names to src\zbarlight.egg-info\top_level.txt
writing dependency_links to src\zbarlight.egg-info\dependency_links.txt
reading manifest file 'src\zbarlight.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs'
no previously-included directories found matching 'tests'
warning: no previously-included files matching '*.py[cod]' found anywhere in distribution
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files found matching 'Makefile'
warning: no previously-included files found matching 'requirements-dev.txt'
warning: no previously-included files found matching 'tox.ini'
writing manifest file 'src\zbarlight.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
building 'zbarlight._zbarlight' extension
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall "-IC:\Program Files (x86)\ZBar\include" -Ic:\python27\include -Ic:\python27\PC -c src/zbarlight/_zbarlight.c -o build\temp.win32-2.7\Release\src\zbarlight\_zbarlight.o -std=c99
writing build\temp.win32-2.7\Release\src\zbarlight\_zbarlight.def
c:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.7\Release\src\zbarlight\_zbarlight.o build\temp.win32-2.7\Release\src\zbarlight\_zbarlight.def "-LC:\Program Files (x86)\ZBar\lib" -Lc:\python27\libs -Lc:\python27\PCbuild -Lc:\python27\PC\VS9.0 -llibzbar-0 -lpython27 -lmsvcr90 -o build\lib.win32-2.7\zbarlight\_zbarlight.pyd
creating build\bdist.win32
creating build\bdist.win32\egg
creating build\bdist.win32\egg\zbarlight
copying build\lib.win32-2.7\zbarlight\_zbarlight.c -> build\bdist.win32\egg\zbarlight
copying build\lib.win32-2.7\zbarlight\_zbarlight.pyd -> build\bdist.win32\egg\zbarlight
copying build\lib.win32-2.7\zbarlight\__init__.py -> build\bdist.win32\egg\zbarlight
byte-compiling build\bdist.win32\egg\zbarlight\__init__.py to __init__.pyc
creating stub loader for zbarlight\_zbarlight.pyd
byte-compiling build\bdist.win32\egg\zbarlight\_zbarlight.py to _zbarlight.pyc
creating build\bdist.win32\egg\EGG-INFO
copying src\zbarlight.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying src\zbarlight.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying src\zbarlight.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying src\zbarlight.egg-info\not-zip-safe -> build\bdist.win32\egg\EGG-INFO
copying src\zbarlight.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying src\zbarlight.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
writing build\bdist.win32\egg\EGG-INFO\native_libs.txt
creating dist
creating 'dist\zbarlight-1.2-py2.7-win32.egg' and adding 'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing zbarlight-1.2-py2.7-win32.egg
removing 'c:\python27\lib\site-packages\zbarlight-1.2-py2.7-win32.egg' (and everything under it)
creating c:\python27\lib\site-packages\zbarlight-1.2-py2.7-win32.egg
Extracting zbarlight-1.2-py2.7-win32.egg to c:\python27\lib\site-packages
zbarlight 1.2 is already the active version in easy-install.pth Installed c:\python27\lib\site-packages\zbarlight-1.2-py2.7-win32.egg
Processing dependencies for zbarlight==1.2
Searching for Pillow==4.0.0
Best match: Pillow 4.0.0
Adding Pillow 4.0.0 to easy-install.pth file Using c:\python27\lib\site-packages
Searching for olefile==0.44
Best match: olefile 0.44
Adding olefile 0.44 to easy-install.pth file Using c:\python27\lib\site-packages
Finished processing dependencies for zbarlight==1.2

-- END --

windows平台python 2.7环境编译安装zbarlight的更多相关文章

  1. windows平台python 2.7环境编译安装zbar

    最近一个项目需要识别二维码,找来找去找到了zbar和zxing,中间越过无数坑,总算基本上弄明白,分享出来给大家. 一.zbar官方介绍 ZBar 是款桌面电脑用条形码/二维码扫描工具,支持摄像头及图 ...

  2. Windows平台Python Pyramid实战从入门到进阶:第一个服务

    Pyramid是比较流行的Python Web 框架,比较灵活,功能也很强大.最近项目上用到,便打算学习一下.网上教程比较少,而且很多都是针对linux平台的,我是windows土著所以对那些linu ...

  3. windows下python web开发环境的搭建

    windows下python web开发环境: python2.7,django1.5.1,eclipse4.3.2,pydev3.4.1 一. python环境安装 https://www.pyth ...

  4. Windows系统在Python2.7环境下安装numpy, matplotlib, scipy - Lichanghao Blog

    numpy, matplotlib, scipy三个包是科学计算和绘图的利器.安装它们既可以在网上下载exe安装包,也可以用python内置的包管理工具来下载安装,后者较为方便. 这几天做美赛要用到, ...

  5. Centos7之LNMP环境编译安装

    Centos7之LNMP环境编译安装 一.系统环境准备 注:安装时间过长,只做参考!!!1.系统信息 [root@localhost ~]# uname -r 3.10.0-957.el7.x86_6 ...

  6. Windows平台 python环境配置

    下载python:https://www.python.org/downloads/windows/,一般就下载 executable installer,x86 表示是 32 位机子的,x86-64 ...

  7. windows平台下基于VisualStudio的Clang安装和配置

    LLVM 是一个开源的编译器架构,它已经被成功应用到多个应用领域.Clang是 LLVM 的一个编译器前端,它目前支持 C, C++, Objective-C 以及 Objective-C++ 等编程 ...

  8. cocos2d-x 2.1.4学习笔记01:windows平台搭建cocos2d-x开发环境

    cocos2d-x的大致开发流程是,首先使用win32版进行代码编写并完成游戏,然后将代码迁移到对应的开发环境上进行交叉编译完成游戏打包,如iphone上是mac+xcode,android是ecli ...

  9. windows平台 python生成 pyd文件

    Python的文件类型介绍: .py       python的源代码文件 .pyc     Python源代码import后,编译生成的字节码 .pyo     Python源代码编译优化生成的字节 ...

随机推荐

  1. js、jquery实现模糊搜索功能

    模糊搜索功能在工作中应用广泛,并且很实用,自己写了一个方法,以后用到的时候可以直接拿来用了! 实现的搜索功能: 1. 可以匹配输入的字符串找出列表中匹配的项,列表框的高度跟随搜索出的列表项的多少改变 ...

  2. java集合框架(Collections Framework)

    */ .hljs { display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; } .hl ...

  3. pycharm运行scrapy

    1.打开pycharm, 点击File>Open找到mySpider项目导入 . 2.打开File>Settings>Project 点击Project Interpreter 右边 ...

  4. Spark2.2.0分布式集群安装(StandAlone模式)

    一.依赖文件安装 1.1 JDK 参见博文:http://www.cnblogs.com/liugh/p/6623530.html 1.2 Scala 参见博文:http://www.cnblogs. ...

  5. 【java】java.util.Arrays类常用方法

    package Arrays类; import java.util.Arrays; public class TestArrays { public static void main(String[] ...

  6. Linux内置命令

    主要Shell内置命令 Shell有很多内置在其源代码中的命令.这些命令是内置的,所以Shell不必到磁盘上搜索它们,执行速度因此加快.不同的Shell内置命令有所不同. A.2.1 bash内置命令 ...

  7. Jmeter+Ant+Jenkins接口自动化测试(一)_环境部署

    前言: 2017年最后一个月份,今天抽出时间把之前的一些记录分享出来,也为今年画上个简单的句号吧,无论好与坏,无论成功与失败,简单的记忆,不要留下点点空白. 特别提示: 知识是用来分享的,但是也要尊重 ...

  8. 5.前端基于react,后端基于.net core2.0的开发之路(5) 配置node层,session设置、获取,请求拦截

    1.总结一下 今年,2月份从深圳来到广州,工作到现在,回头看,完成的项目4-5个,公司基本没有懂技术的领导,所以在技术选型上,我们非常的自由,所以内心一直都不满足现状,加上一起工作的小伙伴给力(哈哈哈 ...

  9. 未来五年什么样的IT技术最具颠覆性?这里有你想知道的答案

    据外媒报道称,近日Gartner研讨会在美国弗罗里达州奥兰多举行,智能化.大数据和物联网成为届研讨会的三大主题.市场研究机构Gartner Research的副总裁兼资深研究员大卫·卡利(David ...

  10. Hello TensorFlow 三 (Golang)

    在一台ubuntu 16.04.2虚拟机上为golang安装TensorFlow. 官方参考:https://www.tensorflow.org/install/install_go 首先安装go ...