关于fastzbarlight

出现了和 fastzbarlight build failed on MacOSX 10.11.6中相同的问题,其实第一个回答的人duguyue100说的很好,具体实现方法参见morizotter提出的:

My way(Mac):
Install zbar with Homebrew like brew install zbar --without-xshm

  1. Download fastzbarlight from its site.
  2. Move to fastzbarlight directory.
  3. Rewrite setup.py's zbar link like below:
# extra_link_args=[os.path.join(os.path.dirname(__file__), 'src/fastzbarlight/vendor/zbar-0.10/zbar/.libs/libzbar.a')],
extra_link_args=[os.path.join(os.path.dirname(__file__), '/usr/local/Cellar/zbar/XXXX/lib/libzbar.a')],# here XXXX is your zbar version
  1. Then, python setup.py install
  2. Finally,
cd ~ 
pip install -e

succeeds!

你可能感兴趣的:(关于fastzbarlight)