win10python3.9安装pycocotools

在Windows系统中安装pycocotools库时遇到了'No module named 'pycocotools''的错误。由于官方pip源没有提供与Python 3.9兼容的版本,博主尝试修改whl文件名以匹配Python 3.9,最终成功安装。这一解决方案对于遇到相同问题的Python 3.9用户具有参考价值。

问题

报错: No module named ‘pycocotools’

原因

没有pycocotools库,但是pip安装方法在win系统不可行。
在这里插入图片描述
下载地址:https://pypi.tuna.tsinghua.edu.cn/simple/pycocotools-windows/
进行cmd命令安装:pip install pycocotools_windows-2.0-cp38-cp38-win_amd64.whl

又出现问题

在这里插入图片描述
参考https://blog.csdn.net/sinat_35129548/article/details/112367920这位博主,发现我的python是3.9,没有适配的安装包
在这里插入图片描述

解决

后面尝试将pycocotools_windows-2.0-cp38-cp38-win_amd64.whl改为pycocotools_windows-2.0-cp39-cp39-win_amd64.whl,居然安装成功了

在这里插入图片描述

pip install PaddleX==2.1.0 Collecting PaddleX==2.1.0 Downloading paddlex-2.1.0-py3-none-any.whl.metadata (907 bytes) Requirement already satisfied: pycocotools in e:\python3.9\lib\site-packages (from PaddleX==2.1.0) (2.0.8) Requirement already satisfied: pyyaml in e:\python3.9\lib\site-packages (from PaddleX==2.1.0) (6.0.2) Requirement already satisfied: colorama in e:\python3.9\lib\site-packages (from PaddleX==2.1.0) (0.4.6) Requirement already satisfied: tqdm in e:\python3.9\lib\site-packages (from PaddleX==2.1.0) (4.67.1) Collecting paddleslim==2.2.1 (from PaddleX==2.1.0) Downloading paddleslim-2.2.1-py3-none-any.whl.metadata (1.3 kB) Requirement already satisfied: visualdl>=2.2.2 in e:\python3.9\lib\site-packages (from PaddleX==2.1.0) (2.5.3) Requirement already satisfied: shapely>=1.7.0 in e:\python3.9\lib\site-packages (from PaddleX==2.1.0) (2.0.7) Requirement already satisfied: opencv-python in e:\python3.9\lib\site-packages (from PaddleX==2.1.0) (4.6.0.66) Requirement already satisfied: scipy in e:\python3.9\lib\site-packages (from PaddleX==2.1.0) (1.13.1) Collecting lap (from PaddleX==2.1.0) Downloading lap-0.5.12-cp39-cp39-win_amd64.whl.metadata (6.3 kB) Requirement already satisfied: motmetrics in e:\python3.9\lib\site-packages (from PaddleX==2.1.0) (1.4.0) Collecting scikit-learn==0.23.2 (from PaddleX==2.1.0) Downloading scikit-learn-0.23.2.tar.gz (7.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.2/7.2 MB 34.0 MB/s eta 0:00:00 Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [89 lines of output] Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX" and platform_python_implementation == "CPython"' don't match your environment Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX" and platform_python_implementation != "CPython"' don't match your environmen
最新发布
03-15
评论 17
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值