Windows Platform Python 2.7 environment compilation installation Zbarlight

Source: Internet
Author: User

Similar to the situation described in the previous post, http://www.cnblogs.com/zhongtang/p/7148082.html.

The compilation zbarlight also has the problem, the brief processing steps are as follows:

1, to https://pypi.python.org/pypi/zbarlight download source files.

on
File Type Py Version uploadedSize
ZBARLIGHT-1.2.TAR.GZ (MD5) Source 2017-03-09 5KB

2. Unzip to the desktop directory,c:\users\zou\desktop\zbarlight\zbarlight-1.2>

Modify the setup.py file to add three lines of red font, as follows:

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:\Progra M Files (x86) \zbar\include ' ], optional=os.environ.get ('Readthedocs', False),#Do not build on Read the Docs        ),    ],

3, manual compilation and installation, success:

C:\users\zou\desktop\zbarlight\zbarlight-1.2>python Setup.py INSTALLC:\python27\lib\distutils\extension.py:133: Userwarning:unknown Extension options: ' Optional ' warnings. Warn (msg)running installrunning bdist_eggrunning egg_infowriting requirements to SRC\zbarlight.egg-info\requires.txtwriting src\zbarlight.egg-info\pkg-infowriting top-level names to Src\zbarlight.egg-info\top_level.txtwriting dependency_links to src\zbarlight.egg-info\dependency_links.txtreading 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-includedFilesMatching ' *.Py[cod] ' found anywhere in Distributionwarning:no previously-includedFilesmatching ' __pycache__ ' found anywhere in Distributionwarning:no previously-includedFilesMatching ' *.So ' found anywhere in Distributionwarning:no previously-includedFilesfound matching ' Makefile ' Warning:no previously-includedFilesFound matching ' Requirements-dev.txt ' warning:no previously-includedFilesFound matching ' Tox.INI ' writing manifest file ' src\zbarlight.egg-info\sources.txt ' Installing library code to build\bdist.win32\eggrunning install_librunning build_pyrunning build_extbuilding ' Zbarlight._zbarlight ' Extensionc:\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=c99writing Build\temp.win32-2.7\release\src\zbarlight\_zbarlight.DEFC:\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 .pydcreating Build\bdist.win32creating Build\bdist.win32\eggcreating Build\bdist.win32\egg\zbarlightcopying Build\LIB.WIN32-2.7\ZBARLIGHT\_ZBARLIGHT.C-build\bdist.win32\egg\zbarlightcopying Build\lib.win32-2.7\zbarlight\_zbarlight.pyd-build\bdist.win32\egg\zbarlightcopying Build\lib.win32-2.7\zbarlight\__init__.py-build\bdist.win32\egg\zbarlightbyte-compiling Build\bdist.win32\egg\zbarlight\__init__.py to __init__.pyccreating stub loader forZbarlight\_zbarlight.pydbyte-compiling Build\bdist.win32\egg\zbarlight\_zbarlight.py to _zbarlight.pyccreating Build\bdist.win32\egg\egg-infocopying src\zbarlight.egg-info\pkg-info-build\bdist.win32\egg\egg-infocopying src\zbarlight.egg-info\sources.txt-build\bdist.win32\egg\egg-infocopying src\zbarlight.egg-info\dependency_links.txt-build\bdist.win32\egg\egg-infocopying src\zbarlight.egg-info\ not-zip-safe-build\bdist.win32\egg\egg-infocopying src\zbarlight.egg-info\requires.txt-build\bdist.win32\egg\egg-infocopying src\zbarlight.egg-info\top_level.txt-build\bdist.win32\egg\egg-infowriting Build\bdist.win32\egg\egg-info\native_libs.txtcreating distcreating ' Dist\zbarlight-1.2-py2.7-win32.egg ' and adding ' build\bdist.win32\egg ' to itremoving ' build\bdist.win32\egg ' (and everything under it)processing zbarlight-1.2-py2.7-win32.eggremoving ' 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.eggextracting zbarlight-1.2-py2.7-win32.egg to C:\python27\lib\Site-packageszbarlight1.2 is already the active version in Easy-install.pthinstalled C:\python27\lib\site-packages\zbarlight-1.2-py2.7-win32.eggprocessing Dependencies forzbarlight==1.2Searching forpillow==4.0.0Best Match:pillow4.0.0Adding Pillow4.0.0 to Easy-install.PTH fileusing C:\python27\lib\site-packagessearching forolefile==0.44Best Match:olefile0.44Adding Olefile0.44 to Easy-install.PTH fileusing C:\python27\lib\site-packagesfinished processing Dependencies forzbarlight==1.2

--END--

Windows Platform Python 2.7 environment compilation installation Zbarlight

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.