网站外包注意事项,微信注册网站,让人做网站需要注意哪些问题,个人网站可以做充值大家好#xff0c;我是水滴~~
本文主要介绍在安装 stable-diffusion-webui 时出现的 ERROR: No matching distribution found for torch2.0.1 问题的解决方案#xff0c;希望能对你有所帮助。 《Python入门核心技术》专栏总目录・点这里 文章目录 问题描述解决方案离线安装 …大家好我是水滴~~
本文主要介绍在安装 stable-diffusion-webui 时出现的 ERROR: No matching distribution found for torch2.0.1 问题的解决方案希望能对你有所帮助。 《Python入门核心技术》专栏总目录・点这里 文章目录 问题描述解决方案离线安装 PyTorch 问题描述
在安装 stable-diffusion-webui 过程中出现ERROR: No matching distribution found for torch2.0.1错误详细错误如下
ERROR: Could not find a version that satisfies the requirement torch2.0.1 (from versions: none)
ERROR: No matching distribution found for torch2.0.1
Traceback (most recent call last):File D:\StableDiffusion\stable-diffusion-webui\launch.py, line 48, in modulemain()File D:\StableDiffusion\stable-diffusion-webui\launch.py, line 39, in mainprepare_environment()File D:\StableDiffusion\stable-diffusion-webui\modules\launch_utils.py, line 378, in prepare_environmentrun(f{python} -m {torch_command}, Installing torch and torchvision, Couldnt install torch, liveTrue)File D:\StableDiffusion\stable-diffusion-webui\modules\launch_utils.py, line 116, in runraise RuntimeError(\n.join(error_bits))
RuntimeError: Couldnt install torch.
Command: D:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe -m pip install torch2.0.1 torchvision0.15.2 --extra-index-url https://download.pytorch.org/whl/cu118
Error code: 1解决方案
这跟 Python 的版本有关系在当前版本中找不到 PyTorch 2.0.1 版本。官方要求的版本是 Python 3.10.6你可以检查你的 Python 版本是否正确。 注意在运行 webui-user.bat 时会在stable-diffusion-webui项目中创建一个 Python 虚拟环境所以检查版本应该使用下面命令 D:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe --version 如果版本不正确请安装正确的 Python 3.10.6 版本。
安装好 Python 后编辑 webui-user.bat在 set PYTHON后面指定 Python 可执行文件的路径如下图 然后删除 stable-diffusion-webui 目录下的 venv目录重新运行 webui-user.bat这样就能正常下载安装 PyTorch 了如下图 离线安装 PyTorch
如果你觉得上面方法安装的速度慢也可以先使用迅雷下载下来打开官方下载页https://download.pytorch.org/whl/torch/找到要下载的版本右击使用迅雷下载。如下图 或者直接下载torch-2.0.1cu118-cp310-cp310-win_amd64.whl
下载完后可使用下成命令安装
D:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe -m pip install D:\StableDiffusion\torch-2.0.1cu118-cp310-cp310-win_amd64.whl