Zbar + python, crashes on import (OSX 10.9.1)

后端 未结 1 1802
攒了一身酷
攒了一身酷 2021-01-01 19:13

I\'ve attempted to install Zbar for use with python 2.7.6 with Homebrew and pip (brew install zbar, then pip install zbar) but every time I import it, python crashes. Simply

相关标签:
1条回答
  • 2021-01-01 19:39

    I found the answer, but I wanted to post it here anyway in case anyone has the same trouble I did. You can use the brew installation of zbar, but you have to install to python via: pypi.python.org/pypi/zbar using this patch: https://github.com/npinchot/zbar/commit/d3c1611ad2411fbdc3e79eb96ca704a63d30ae69. Also, be sure to use which python in the terminal to make sure it's checking in the right directory. The only reliable way I found to make it do this was to edit ~/.bashrc and add the /usr/local/ and /usr/local/bin/ directories to it, and then source ~/.bashrc whenever I opened a terminal to install anything via pip or Homebrew.

    Thanks for the tip about answering and accepting @lkraider

    0 讨论(0)
提交回复
热议问题