[英]ImportError: No module named pytesseract in ubuntu
i have installed two libraries pillow
& pytesseract
by pip3
我已经通过pip3
安装了两个库pillow
和pytesseract
in order to do ocr为了做ocr
when i run this code当我运行这段代码时
import Image
from pytesseract import image_to_string
img = Image.open('mz.png')
print(image_to_string(img))
i am getting ImportError: No module named pytesseract
error when i again install pytesseract
it says requirement satisfied
当我再次安装pytesseract
时出现ImportError: No module named pytesseract
错误,它说requirement satisfied
whats wrong with this这有什么问题
您可能已安装了多个Python版本,并尝试与另一个文件一起运行文件,因为您已将软件包安装到其中
try and install tesseract ocr with sudo apt-get install tesseract-ocr
尝试使用sudo apt-get install tesseract-ocr
安装tesseract ocr sudo apt-get install tesseract-ocr
and then use sudo pip3 install pytesseract
然后使用sudo pip3 install pytesseract
these 2 lines should fix your problem. 这2行应该可以解决您的问题。
Try to run following 3 commands first in sequential manner尝试以顺序方式首先运行以下 3 个命令
and then install pytesseract using然后使用安装 pytesseract
This should fix your problem.这应该可以解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.