我在Windows 10上使用Anaconda Navigator 1.7.0,我创建了一个名为“venv”的虚拟环境,并在其中安装了Python版本3.5.2以及selenium,fuzzywuzzy和其他模块。
一切都很好,除了pytesseract。
我的python脚本:
import pytesseract
from PIL import Image
im =Image.open("C:\\Users\\stan\\Desktop\\sample.jpg")
text = pytesseract.image_to_string(im, lang ='eng')
print(text)
我得到以下错误:
Traceback (most recent call last):
File "C:\Users\stan\MyPythonScripts\tess11.py", line 1, in <module>
import pytesseract
ModuleNotFoundError: No module named 'pytesseract'
我使用pip install来安装所有模块。
到目前为止我采取的解决方案:
pip install
pytesseract
在虚拟env中安装了pytesseract,pip install pytesseract
并检查pytesseract是否存在于我试图运行的虚拟环境的“site-packages”中,这两个步骤我已经采取了。任何人都可以建议我可能会缺少什么,或者指出我可以研究这个主题的方向吗?
除了pip install之外,还有其他方法可以安装pytesseract,这可能有助于这种情况吗?