【已解决】paddleocr:ERROR: Could not build wheels for lanms-neo, which is required to install pyproject

说明

最近在尝试使用paddlenlp和paddleocr,安装paddlenlp很顺利,但是安装paddleocr时遇到了一些问题,记录一下
首先说一下我个人的主要环境配置:
系统:win10
python环境:3.7
paddlenlp 2.4.2
paddlepaddle 2.3.2
pip 22.3
有一些类似于Shapely 的包,需要下载手动安装,报错缺少安装即可,教程很多,这里不再解释,记录一下没搜到的问题,最后时在github上求助得到解决的。

问题

pip安装paddleocr报错
有一些其他问题,但是较好解决
下面这个错误没有找到相关方案

Failed to build lanms-neo
ERROR: Could not build wheels for lanms-neo, which is required to install pyproject.toml-based projects

第一次尝试

于是我上GitHub进行了提问,回复很快(应该是官方人员),现在把过程记录下来
首先是让我尝试直接安装lanms-neo

pip install lanms-neo -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

跟之前直装paddleocr是一样的问题,依旧报错

(venv) D:\Program Files\paddle_NLP>pip install lanms-neo -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple
Collecting lanms-neo
Downloading http://pypi.doubanio.com/packages/7b/fe/beff7e7e4455cb9f69c5734897ca8552a57f6423b062ec86b2ebc1d79c0d/lanms_neo-1.0.2.tar.gz (39 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: lanms-neo
Building wheel for lanms-neo (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for lanms-neo (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-37
creating build\lib.win-amd64-cpython-37\lanms
copying lanms_init_.py -> build\lib.win-amd64-cpython-37\lanms
running build_ext
building 'lanms._C' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[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

检查了Microsoft Visual C++ 的版本,也是14+,跟这个其实没关系

在这里插入图片描述

第二次尝试

更换版本
应该是官方维护人员,建议安装2.6.0.3或2.6.0.2试试

最后使用2.6.0.2安装成功,但是2.6.0.3还存在相同问题
不过也可以使用了

  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 21
    评论
评论 21
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爱挠静香的下巴

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值