在PaddleOCR-release-2.6框架下运行OCR模型,构建其虚拟环境时,报错
我的基础环境为:
系统:win10
主框架:PaddleOCR-release-2.6
pip:22.3
python:3.8
以下为第一次报错信息:
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lanms-neo
............
Failed to build lanms-neo
ERROR: Could not build wheels for lanms-neo, which is required to install pyproject.toml-based projects
第一次尝试解决,此时未意识到error: command ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe’ failed with exit code 2报错信息的重要性,借鉴其他博主经验,直接安装pip install lanms-neo,仍然报错,报错信息未变。文章来源:https://www.toymoban.com/news/detail-508640.html
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lanms-neo
Failed to build lanms-neo
ERROR: Could not build wheels for lanms-neo, which is required to install pyproject.toml-based projects
第二次尝试,借鉴其他博主经验,可能是paddleocr版本问题,于是指定版本安装pip install paddleocr==2.6.0.2 -i https://pypi.douban.com/simple,不需要删除之前版本,自动更新。新版本paddleocr安装完毕,于是对虚拟环境的迭代安装pip install -r ./requirements.txt,依然报错,报错信息未变。
第三次尝试,想想在新的版本下直接安装lanms-neo,pip install lanms-neo,依然报错,报错信息未变。
第四次尝试,可能是解决错误的方向错了,于是对关键报错信息error: command ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe’ failed with exit code 2进行搜索,借鉴其他博主经验,说是电脑缺少安装Microsoft Visual C++,但是在本机中之前就安装了Microsoft Visual C++各种版本;于是再次搜索该报错信息,其他博主经验为,‘使用C++的桌面开发’,但是给的操作信息不全,于是搜索‘使用C++的桌面开发’,得到详细的操作步骤。
等待安装完毕即可!
不需要关机重启,在终端即可进行pip install -r .\requirements.txt虚拟环境的迭代安装!
文章来源地址https://www.toymoban.com/news/detail-508640.html
到了这里,关于报错ERROR: Could not build wheels for lanms-neo导致Failed to build lanms-neo情况之一分析与解决的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!