yolov5配置(cpu)
#打开anaconda命令窗
conda create -n yolov5 python=3.8
activate yolov5
git clone https://github.com/ultralytics/yolov5.git
#cd 进入到yolov5目录中
pip install -U -r requirements.txt
yolov5测试
在官网下载yolov5代码以及模型(.pt文件)https://github.com/ultralytics/yolov5
打开yolov5文件夹输入
python detect.py --source 0 --weight E:\chengxu\yolov5\weights\yolov5s.pt
bug及解决方法
问题描述
Building wheel for pycocotools (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'E:\anaconda\anaconda\envs\yolov5\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\WYD\\AppData\\Local\\Temp\\pip-install-j7554uaz\\pycocotools_95037ce57904498d8c947bc8cb6b7ab2\\setup.py'"'"'; __file__='"'"'C:\\Users\\WYD\\AppData\\Local\\Temp\\pip-install-j7554uaz\\pycocotools_95037ce57904498d8c947bc8cb6b7ab2\\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\WYD\AppData\Local\Temp\pip-wheel-zb3vvgqh'
cwd: C:\Users\WYD\AppData\Local\Temp\pip-install-j7554uaz\pycocotools_95037ce57904498d8c947bc8cb6b7ab2\
Complete output (16 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib