Fedora 39:稳定扩散自动1111:不兼容的Python版本错误

问题描述 投票:0回答:1

美好的一天。

我在 Fedora 39 上运行稳定扩散时遇到一些问题

我的系统信息:

Kernel: 6.5.6-300.fc39.x86_64 arch: x86_64 bits: 64
    Console: pty pts/1 Distro: Fedora release 39 (Thirty Nine)
Machine:
  Type: Laptop System: LENOVO product: 82N6 v: Legion 7 16ACHg6
    serial: 
  Mobo: LENOVO model: LNVNB161216 v: NO DPK serial:  UEFI: LENOVO
    v: GKCN60WW date: 03/07/2023
Battery:
  ID-1: BAT0 charge: 47.4 Wh (60.0%) condition: 79.0/80.0 Wh (98.7%)
CPU:
  Info: 8-core model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64
    type: MT MCP cache: L2: 4 MiB
  Speed (MHz): avg: 814 min/max: 400/3201 cores: 1: 512 2: 400 3: 400 4: 400
    5: 456 6: 2196 7: 400 8: 2518 9: 400 10: 400 11: 400 12: 456 13: 512 14: 400
    15: 400 16: 2781
Graphics:
  Device-1: NVIDIA GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB]
    driver: nvidia v: 535.113.01
  Device-2: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
    driver: amdgpu v: kernel
  Device-3: Bison Integrated Camera driver: uvcvideo type: USB
  Display: server: X.Org v: 23.2.1 with: Xwayland v: 23.2.1 driver: X:
    loaded: amdgpu,nvidia unloaded: fbdev,modesetting,nouveau,vesa dri: radeonsi
    gpu: amdgpu resolution: 1920x1200~60Hz
  API: OpenGL v: 4.6 Mesa 23.2.1 renderer: AMD Radeon Graphics (renoir LLVM
    16.0.6 DRM 3.54 6.5.6-300.fc39.x86_64)`

它曾经在 Fedora 38 上运行良好,但现在它抱怨 Python 版本错误,我不知道如何让它工作。

错误信息:

/webui.sh
 
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################
 
################################################################
Running on semela user
################################################################
 
################################################################
Create and activate python venv
################################################################
 
################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
=============================================================================================
INCOMPATIBLE PYTHON VERSION
 
This program is tested with 3.10.6 Python, but you have 3.12.0.
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.
 
You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3106/
 
 
 
Use --skip-python-version-check to suppress this warning.
=============================================================================================
Python 3.12.0 (main, Oct  2 2023, 00:00:00) [GCC 13.2.1 20230918 (Red Hat 13.2.1-3)]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118
ERROR: Could not find a version that satisfies the requirement torch==2.0.1 (from versions: none)
ERROR: No matching distribution found for torch==2.0.1
 
[notice] A new release of pip is available: 23.2.1 -> 23.3.1
[notice] To update, run: pip install --upgrade pip
Traceback (most recent call last):
  File "/home/semela/stable_diffusion/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/home/semela/stable_diffusion/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/home/semela/stable_diffusion/stable-diffusion-webui/modules/launch_utils.py", line 352, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "/home/semela/stable_diffusion/stable-diffusion-webui/modules/launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/home/semela/stable_diffusion/stable-diffusion-webui/venv/bin/python3" -m pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url https://download.pytorch.org/whl/cu118
Error code: 1

我尝试执行以下操作:

  1. 我安装了pyton3.10
  2. 我编辑了文件 webui-user.sh 并进行了更改
#python3 executable
#python_cmd="python"

#python3 executable
#python_cmd="python3.10"

之后我删除了 venv 文件夹并尝试再次运行 webui.sh,但没有帮助。

我错过了什么?

谢谢你

python fedora stable-diffusion
1个回答
0
投票

如果错误仍然存在,尽管您安装了 Python 3.10,但脚本可能是使用 3.12 执行的。尝试卸载所有 python 版本并再次安装 3.10。之后,删除 venv 并重新创建它。

© www.soinside.com 2019 - 2024. All rights reserved.