Skip to content

[Bug]: Doesn't run in newer python versions (ex. python v3.13.5.) #17146

@Rein-42

Description

@Rein-42

Checklist

  • The issue exists after disabling all extensions
  • 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?

This program is tested with 3.10.6 Python, but you have 3.13.5.

ERROR: Could not find a version that satisfies the requirement torch==2.1.2 (from versions: none)
ERROR: No matching distribution found for torch==2.1.2
Traceback (most recent call last):
File "D:\Download\Programs\stable-diffusion-webui-master\launch.py", line 48, in
main()
~~~~^^
File "D:\Download\Programs\stable-diffusion-webui-master\launch.py", line 39, in main
prepare_environment()
~~~~~~~~~~~~~~~~~~~^^
File "D:\Download\Programs\stable-diffusion-webui-master\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 "D:\Download\Programs\stable-diffusion-webui-master\modules\launch_utils.py", line 116, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "D:\Download\Programs\stable-diffusion-webui-master\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

Steps to reproduce the problem

Try to open program with python version newer than 1.10

What should have happened?

update if possible, so it work with latest python versions

What browsers do you use to access the UI ?

Brave

Sysinfo

sysinfo.py

Console logs

This program is tested with 3.10.6 Python, but you have 3.13.5.

ERROR: Could not find a version that satisfies the requirement torch==2.1.2 (from versions: none)
ERROR: No matching distribution found for torch==2.1.2
Traceback (most recent call last):
  File "D:\Download\Programs\stable-diffusion-webui-master\launch.py", line 48, in <module>
    main()
    ~~~~^^
  File "D:\Download\Programs\stable-diffusion-webui-master\launch.py", line 39, in main
    prepare_environment()
    ~~~~~~~~~~~~~~~~~~~^^
  File "D:\Download\Programs\stable-diffusion-webui-master\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 "D:\Download\Programs\stable-diffusion-webui-master\modules\launch_utils.py", line 116, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "D:\Download\Programs\stable-diffusion-webui-master\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

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-reportReport of a bug, yet to be confirmed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions