python - 导入错误: No module named pytesseract in ubuntu

标签 python python-3.x pip

我已经通过pip3安装了两个库pillowpytesseract

为了进行ocr
当我运行这段代码时

import Image
from pytesseract import image_to_string

img = Image.open('mz.png')

print(image_to_string(img))

我收到ImportError:没有名为 pytesseract 的模块 错误 当我再次安装pytesseract时,它说满足要求

这有什么问题

最佳答案

您可能安装了多个 Python 版本,并尝试使用另一个版本作为您已安装软件包的版本来运行您的文件

关于python - 导入错误: No module named pytesseract in ubuntu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55162448/

相关文章:

python - 如何处理重复事件中的 DST 和 TZ?

python正则表达式在标点符号和字母之间插入一个空格

Python PIP 安装抛出 TypeError : unsupported operand type(s) for -=: 'Retry' and 'int'

python - 在不使用 pip 的情况下安装 python wheel 文件

python - 文件位置和用法 : apt-get install python-<pkg> vs. pip3 install <pkg>

python - 使用 psutil.Process.memory_info 内存使用情况与 Pandas.memory_usage 不同

python - 如何将字符串解释为字节?

python - 使用 arr copy() 函数时得到错误答案

algorithm - 带重复的排序排列秩

python - 根据值是否位于另一列的列表中,用 0 或 1 填充空 (NaN) 列