问题描述
我试图在我的Raspberry Pi 2上将qrtools模块与Python 3.4.2结合使用,但是由于我未安装zbar
模块,它无法运行.尝试
I am trying to use the qrtools module with Python 3.4.2 on my Raspberry Pi 2, however it cannot run as I don't have the zbar
module installed. Trying
pip-3.2 install zbar
给出图片中显示的错误消息
Gives the error message shown in the picture
sudo pip-3.2 install zbar
出现类似的错误
有什么想法吗?
(我确实在Python 2.7中安装了它)
(I do have it installed with Python 2.7)
更新:libzbar-dev和python3-dev都是最新的.还是...
UPDATE: Both libzbar-dev and python3-dev are up to date. Still...
No module named 'zbar'
推荐答案
假设您使用的是debian衍生产品(如ubuntu),则需要安装zbar
的开发包,其中包含头文件zbar.h
assuming you're using a debian derivative (like ubuntu), you need to install zbar
's developement package, which contains the header file zbar.h
$ sudo apt-get install libzbar-dev
对于redhat/fedora系统:
for redhat/fedora systems:
$ sudo yum install zbar-devel
和可能也是python的dev包:
and probably python's dev package too:
$ sudo apt-get install python3-dev
这篇关于无法安装zbar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!