stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

[Bug]: INCOMPATIBLE PYTHON VERSION This program is tested with 3.10.6 Python, but you have 3.12.1.

Open Promootheus opened this issue 3 months ago • 0 comments

Checklist

  • [ ] The issue exists after disabling all extensions
  • [X] The issue exists on a clean installation of webui
  • [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • [ ] The issue exists in the current version of the webui
  • [ ] The issue has not been reported before recently
  • [ ] The issue has been reported before but has not been fixed yet

What happened?

conda create --name forge python=3.10.6 conda activate a1111 python --version Python 3.10.6 ./webui.sh INCOMPATIBLE PYTHON VERSION This program is tested with 3.10.6 Python, but you have 3.12.1.

Steps to reproduce the problem

Git clone the repo into a folder Create a conda environment with python 3.10.6 activate the conda environment Run ./webui.sh

What should have happened?

It should see that my conda environment is 3.10, and not be looking at my base environment python version

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

webui settings unavailable

Console logs

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on promootheus user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
=============================================================================================
INCOMPATIBLE PYTHON VERSION

This program is tested with 3.10.6 Python, but you have 3.12.1.
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.1 | packaged by Anaconda, Inc. | (main, Jan 19 2024, 15:51:05) [GCC 11.2.0]
Version: f0.0.17v1.8.0rc-latest-276-g29be1da7
Commit hash: 29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7
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.2.0, 2.2.0+cu121, 2.2.1, 2.2.1+cu121, 2.2.2, 2.2.2+cu121)
ERROR: No matching distribution found for torch==2.1.2

[notice] A new release of pip is available: 23.2.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
Traceback (most recent call last):
  File "/home/userfolder/Documents/AI/Forge/stable-diffusion-webui-forge/launch.py", line 51, in <module>
    main()
  File "/home/userfolder/Documents/AI/Forge/stable-diffusion-webui-forge/launch.py", line 39, in main
    prepare_environment()
  File "/home/userfolder/Documents/AI/Forge/stable-diffusion-webui-forge/modules/launch_utils.py", line 425, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "/home/userfolder/Documents/AI/Forge/stable-diffusion-webui-forge/modules/launch_utils.py", line 124, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/home/userfolder/Documents/AI/Forge/stable-diffusion-webui-forge/venv/bin/python3" -m pip install torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cu121
Error code: 1

Additional information

ComfyUI and A1111 work fine launched from their own respective conda environments

Promootheus avatar Apr 05 '24 22:04 Promootheus