yolov5环境配置那些事

下载安装requirements.txt报错:

Building wheel for pycocotools (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for pycocotools (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [16 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-39 creating build\lib.win-amd64-cpython-39\pycocotools copying pycocotools\coco.py -> build\lib.win-amd64-cpython-39\pycocotools copying pycocotools\cocoeval.py -> build\lib.win-amd64-cpython-39\pycocotools copying pycocotools\mask.py -> build\lib.win-amd64-cpython-39\pycocotools copying pycocotools_init__.py -> build\lib.win-amd64-cpython-39\pycocotools running build_ext cythoning pycocotools/mask.pyx to pycocotools_mask.c C:\Users\Administrator\AppData\Local\Temp\pip-build-env-elbsgpdq\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Administrator\AppData\Local\Temp\pip-install-56xbtqxd\pycocotools_84d7a8206f034bfba5c29314bb1b4d84\pycocotools_mask.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'pycocotools._mask' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": Microsoft C++ Build Tools - Visual Studio [end of output]

方案:

根本错误在于Microsoft Visual C++ 14.0 or greater is required.

解决方法 ,重新安装visual studio c++的生成工具(不用安装全部的vs c++)。

链接:  Microsoft C++ Build Tools - Visual Studio 

再重新安装requirements.txt,

pip install -r requirements.txt

完美解决

之后训练自己的模型可以参考这位大佬:

目标检测---教你利用yolov5训练自己的目标检测模型_yolov5如何训练自己的模型_炮哥带你学的博客-CSDN博客

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值