找不到 Python 模块

标签 python

如何从 Python 解释器导入 pyBarcode?根据pyBarcode documentation第一步是导入条码。当我尝试时,它说没有这样的模块。

~# python
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2

>>> import barcode
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named barcode

最佳答案

在使用(importing)pyBarcode 之前,您必须 install它,例如用

pip install pyBarcode

关于找不到 Python 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6587382/

相关文章:

python - Pandas 数据帧 : convert columns into rows of a single column

python - 使用 Python 请求,我可以将 "data"添加到准备好的请求中吗?

python - 当 QComboBox 设置为可编辑时

python - 使用 python(字节数组和 numpy)读取 middlebury 'flow' 文件

python - 计算两个旋转椭圆的交集/并集?

python - 如何理解sklearn的精度指标?

python - 获取对象的外键父级 - Django

java - 如何从java maven项目生成python protobuf

python 3 : Installing gi package with pip

python - 为什么 np.where 比 pd.apply 快