解决Windows 10下pip安装pycocotools报错“ERROR: Failed building wheel for pycocotools”

在Windows 10的Anaconda环境中安装pycocotools时遇到错误。通过首先安装git,然后使用特定命令安装pycocotools,解决了因文件总量大导致的远程连接断开问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 问题描述

如题,在Windows 10 x64主机的Python Anaconda虚拟环境中安装pycocotools包时报错。安装命令为:

pip install pycocotools

执行后报错,如下所示:

Collecting pycocotools
  Using cached https://files.pythonhosted.org/packages/96/84/9a07b1095fd8555ba3f3d519517c8743c2554a245f9476e5e39869f948d2/pycocotools-2.0.0.tar.gz
Building wheels for collected packages: pycocotools
  Building wheel for pycocotools (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\test\Anaconda3\envs\cu100_py37_torch120\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\test\\AppData\\Local\\Temp\\pip-install-09qyqdlo\\pycocotools\\setup.py'"'"'; __file__='"'"'C:\\Users\\test\\AppData\\Local\\Temp\\pip-install-09qyqdlo\\pycocotools\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\test\AppData\Local\Temp\pip-wheel-fx81fe0f' --python-tag cp37
       cwd: C:\Users\test\AppData\Local\Temp\pip-install-09qyqdlo\pycocotools\
  Complete output 
评论 16
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值