出现了和 fastzbarlight build failed on MacOSX 10.11.6中相同的问题,其实第一个回答的人duguyue100说的很好,具体实现方法参见morizotter提出的:
My way(Mac):
Install zbar with Homebrew like brew install zbar --without-xshm
- Download fastzbarlight from its site.
- Move to fastzbarlight directory.
- 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
- Then,
python setup.py install
- Finally,
cd ~
pip install -e
succeeds!
网友评论