快速结论:该报错通常出现在用明显不受支持的 Python 版本(本 Issue 中是 Python 3.14.4)启动 Stable Diffusion WebUI 时,启动脚本在安装 PyTorch 阶段失败,典型提示为 RuntimeError: Couldn't install torch.。优先排查并统一运行 WebUI 的 Python 版本是否为 3.10.x。
适用环境:Issue 中确认的环境为 Windows、Stable Diffusion WebUI 1.10.1、Python 3.14.4、启动脚本 webui.bat;评论中其他用户报告在 OS X 15、Apple M4 上使用 v1.10.1、python 3.10.20、torch 2.3.1、gradio 3.41.2 可以正常运行(xformers 为 N/A)。CUDA 与显卡型号未确认。
最快修复方案:确认 A1111 当前要求 Python 3.10.x;如果系统全局装的是更高版本,可单独安装 Python 3.10,并用该解释器创建/指向 WebUI 的 venv。Issue 评论中给出的做法是:与现有版本并存安装 Python 3.10,然后把 venv 指向它。
注意事项:该结论主要来自 Issue 中维护/社区回复与启动脚本自身的兼容性提示,并非一步验证过的命令级修复;评论也提到 1.10.1 是最后一个版本,后续安装可能还涉及 GitHub 认证与旧仓库不可用等改动,因此降级 Python 不一定能解决所有安装问题。
问题场景
用户在 Windows 上解压并运行 AUTOMATIC1111 Stable Diffusion WebUI 1.10.1,通过 webui.bat 启动。启动脚本先检测到不兼容的 Python 版本,随后在准备环境、执行 pip install torch==2.1.2 torchvision==0.16.2 时找不到匹配的 torch 版本,最终抛出 RuntimeError 并中止启动。
报错原文
INCOMPATIBLE PYTHON VERSION
This program is tested with 3.10.6 Python, but you have 3.14.4.
If you encounter an error with "RuntimeError: Couldn't install torch." message,
or any other error regarding unsuccessful package (library) installation,
please downgrade (or upgrade) to the latest version of 3.10 Python
and delete current Python and "venv" folder in WebUI's directory.
Python 3.14.4 (tags/v3.14.4:23116f9, Apr 7 2026, 14:10:54) [MSC v.1944 64 bit (AMD64)]
Version: 1.10.1
Commit hash: <none>
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121
ERROR: Could not find a version that satisfies the requirement torch==2.1.2 (from versions: 2.9.0, 2.9.1, 2.10.0, 2.11.0)
ERROR: No matching distribution found for torch==2.1.2
Traceback (most recent call last):
File "...\launch.py", line 48, in <module>
main()
File "...\launch.py", line 39, in main
prepare_environment()
File "...\modules\launch_utils.py", line 381, in prepare_environment
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
File "...\modules\launch_utils.py", line 116, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "...\venv\Scripts\python.exe" -m pip install torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cu121
Error code: 1
原因分析
最可能的原因是 WebUI 使用的 Python 版本过新,与它声明的依赖版本不兼容。启动日志已经明确提示:该程序按 Python 3.10.6 测试,而当前环境是 Python 3.14.4。随后 pip 在 https://download.pytorch.org/whl/cu121 下找不到 torch==2.1.2,可用版本只列出 2.9.0、2.9.1、2.10.0、2.11.0,因此安装失败并触发 RuntimeError: Couldn't install torch.。此外日志中还出现 fatal: not a git repository 和 Commit hash: <none>,说明该目录不是完整的 git 仓库,但这不是本次 torch 安装失败的直接原因。
环境排查
- 确认 WebUI 实际调用的 Python 版本以及 venv 内解释器版本,是否为 3.10.x,而不是 3.14.x。
- 确认启动方式是
webui.bat,以及它是从哪个目录、哪个 venv 启动。 - 确认 torch 目标版本与 WebUI 版本是否匹配,本 Issue 中 WebUI 1.10.1 尝试安装的是
torch==2.1.2、torchvision==0.16.2。 - 确认 pip 索引源与平台 wheel 是否可用;Issue 日志中使用的 extra index 为
https://download.pytorch.org/whl/cu121。 - 确认 WebUI 目录是否完整,是否存在
.git目录;本 Issue 日志显示不是 git 仓库。 - 如系统全局已有 Python 3.14,检查是否可以通过独立安装 Python 3.10 并单独创建 venv 来隔离环境。
解决步骤
- 确认 A1111 当前要求的 Python 版本。Issue 中维护/社区回复明确:A1111 目前需要 Python 3.10.x。
- 如果系统全局只有较新的 Python(如本 Issue 的 3.14.4),并行安装一个 Python 3.10。
- 不要复用现有由错误 Python 版本创建的 venv。按启动脚本提示与评论思路,删除 WebUI 目录下当前的
venv文件夹,然后用 Python 3.10 解释器重新创建/指向 venv。 - 再次运行
webui.bat,让启动脚本重新安装依赖。 - 如果仍出现依赖安装失败,检查日志中的 pip 索引源与 torch 版本是否仍不匹配,并参考 Issue 评论中提到的“1.10.1 之后安装还需处理 GitHub 认证和旧仓库不可用”的说法,注意问题可能不只在 Python 版本。
验证方法
重新运行 webui.bat 后,启动日志不应再出现 INCOMPATIBLE PYTHON VERSION 指向 3.14 的提示;Installing torch and torchvision 阶段应能成功解析并安装匹配的 torch/torchvision,不再出现 ERROR: No matching distribution found for torch==2.1.2,也不再以 RuntimeError: Couldn't install torch. 中止。最终 WebUI 应能完成环境准备并进入正常的启动流程。
参考来源
AUTOMATIC1111/stable-diffusion-webui #17380
AI 工具推荐
想把多个 AI 模型放在一个入口?
GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。
推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。
这个方案解决了吗?
可以继续搜索完整报错,或查看同一工具的其他排查指南。
![[Bug]: Kimi-K3-NVFP4 on 8xB300 produces degenerate, incoherent output in the reasoning channel on v0.27.0](https://www.chat-gpts.plus/wp-content/uploads/2026/09/51798-e8ba3af0-768x403.jpg)

