Skip to main content
 首页 » 编程设计

python之导入错误 : No module named 'tesserwrap'

2025年02月15日8artech

Tesseract 已经安装在我的系统中,尝试安装 tesserwrap 但出现错误

使用命令安装 Tesseract-

  pip install tesseract 

尝试使用命令安装 Tesserwrap 模块-

pip install tesserwrap 
 Collecting tesserwrap   Using cached tesserwrap-0.1.6.tar.gz 
        Complete output from command python setup.py egg_info: 
        'ld' is not recognized as an internal or external command, 
        operable program or batch file. 
        'ld' is not recognized as an internal or external command, 
        operable program or batch file. 
        Traceback (most recent call last): 
          File "<string>", line 1, in <module> 
          File "C:\Users\hp\AppData\Local\Temp\pip-build-_ftm6_ot\tesserwrap\setup.py", line 45, in <module> 
            extra_lib_paths) 
          File "C:\Users\hp\AppData\Local\Temp\pip-build-_ftm6_ot\tesserwrap\setup.py", line 30, in find_closest_libname 
            "Cannot find Tesseract via ldconfig, confirm it is installed.") 
        Exception: Cannot find Tesseract via ldconfig, confirm it is installed. 
 
        ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in C:\Users\hp\AppData\Local\Temp\pip-build-_ftm6_ot\tesserwrap\ 

还有其他安装 Tesserwrap 的方法吗?

请您参考如下方法:

tesserwrap 是程序 tesseract 的包装器,而不是 python 包。您需要安装它。对于我在 Mac 上,解决方案是:

brew install tesseract 

然后安装 python 包装器。