stable-diffusion-webui 更换 Python 版本

一、原因

stable-diffusion-webui 推荐版本是 Python 3.10 ,如果电脑中安装了其他版本到Python,会警告推荐使用Python 3.10版本。

官方安装教程 Automatic Installation on Windows

  1. Install Python 3.10.6 (Newer version of Python does not support
    torch), checking “Add Python to PATH”.
  2. Install git.
  3. Download the stable-diffusion-webui repository, for example by
    running git clone
    https://github.com/AUTOMATIC1111/stable-diffusion-webui.git.
  4. Run webui-user.bat from Windows Explorer as normal,
    non-administrator, user.

二、解决方法

打开Windows的系统属性,找到环境变量

在这里插入图片描述

编辑用户变量下的Path
在这里插入图片描述

将Python310移到最上,确定即可

在这里插入图片描述

PowerShell中查看Python版本

在这里插入图片描述

扫描二维码关注公众号,回复: 15285378 查看本文章

如果查看的还是Python其他版本,那么说明你的Python环境变量配置到了系统变量中,在系统变量中找到Path,删除对应的环境变量,如果还是不行,则卸载其他版本的Python

在这里插入图片描述

来到安装 stable-diffusion-webui 的目录下,删除 venv 文件夹里所有的东西

在这里插入图片描述

运行 webui-user.bat 重新下载配置环境

在这里插入图片描述

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_46207024/article/details/131045866
今日推荐