开源库测试
yolov10
https://github.com/THU-MIG/yolov10
conda create -n yolov10 python=3.9
conda activate yolov10
pip install -r requirements.txt
pip install -e .
报错
找不到对应版本
Could not find a version that satisfies the requirement gradio==4.31.5 (from versions: none)
解决:更新pip后再下载
python -m pip install --upgrade pip
python被占用
ERROR: Could not install packages due to an OSError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: ‘C:\Users\Administrator\AppData\Local\Temp\pip-unpack-p4au67lm\orjson-3.10.18-cp39-cp39-win_amd64.whl.metadata’
Consider using the --user
option or check the permissions.
解决:
- 管理员权限;
- 不能有其他命令行或者什么窗口在这个目录运行没关。
单独下载torch.whl
① 命令行输入:nvidia-smi,右上角是cuda版本,本次是12.8
官方下载地址:https://download.pytorch.org/whl/torch_stable.html
- 未解决
ERROR:Exception in ASGI application
现象:在执行python app.py(yolov10的demo)报ERROR: Exception in ASGI application
解决:更换一个gradio版本
Retrying
现象:WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘pypi.org’, port=443): Read timed out. (read timeout=15)”)’: /simple/gradio/
解决:用国内镜像
pip install gradio==4.44.1 http://mirrors.aliyun.com/pypi/simple/
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
- 永久设置:
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
pip config set install.trusted-host mirrors.aliyun.com
ERROR: Cannot unpack file
现象:ERROR: Cannot unpack file C:\Users\Administrator\AppData\Local\Temp\pip-unpack-m7f7krz9\simple (downloaded from C:\Users\Administrator\AppData\Local\Temp\pip-req-build-elsdyvea, content-type: text/html; charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\Administrator\AppData\Local\Temp\pip-req-build-elsdyvea
解决:其中-i是使用镜像源
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn gradio==4.44.1
TypeError: argument of type ‘bool’ is not iterable
现象:在执行python app.py(yolov10的demo)报argument of type ‘bool’ is not iterable
解决:重装pydantic-2.1-.6
pip install pydantic==2.10.6
参考:https://github.com/hiyouga/LLaMA-Factory/issues/7132