Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ERROR: Could not find a version that satisfies the requirement torch==1.13.1+cu117 #7166

Closed
1 task done
sitte opened this issue Jan 24, 2023 · 31 comments
Closed
1 task done
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance

Comments

@sitte
Copy link

sitte commented Jan 24, 2023

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

When I run webui-user.bat I get error:

stderr: ERROR: Could not find a version that satisfies the requirement torch==1.13.1+cu117 (from versions: none)
ERROR: No matching distribution found for torch==1.13.1+cu117

Can I ask for help, suggestion what is the reason? I am using python-3.11.1 and stable-diffusion-v1-5

Steps to reproduce the problem

  1. Run webui-user.bat
  2. wait

What should have happened?

The script should do all the work and run
error

Commit where the problem happens

Commit hash: 602a186

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

No response

Command Line Arguments

No response

Additional information, context and logs

No response

@sitte sitte added the bug-report Report of a bug, yet to be confirmed label Jan 24, 2023
@ClashSAN
Copy link
Collaborator

please use python 3.10
see here - https://github.com/AUTOMATIC1111/stable-diffusion-webui#automatic-installation-on-windows
installing python from microsoft store will grab python 3.11

@Liso7150
Copy link

image
on 3.10.9 it dont work eather...

@Liso7150
Copy link

image on 3.10.9 it dont work eather...

image

@mezotaken mezotaken added asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance and removed bug-report Report of a bug, yet to be confirmed labels Jan 24, 2023
@vt-idiot
Copy link
Contributor

http://download.pytorch.org/whl/cu117/torch-1.13.1%2Bcu117-cp310-cp310-win_amd64.whl - The wheel clearly exists.

It's because the cache in your venv folder still "remembers" that it couldn't find it. If you removed Python 3.11 entirely, just delete E:\Important\stable-diffusion-webui\venv completely. 99% sure it will then just work. If it doesn't, keep reading. And don't forget to close the issue if it does work...


Make sure you uninstalled Python 3.11 completely. py -0p will show you if it's still installed.

image

If you weren't using Python for anything else before webui, there's nothing wrong with uninstalling both 3.11 and 3.10, and then installing 3.10, as an administrator. Don't install Python "for current user only" - it is a source of many headaches, Ed boy.

Make sure to also install the py launcher when it asks you, also for all users, which will help you with any other version related shenanigans in the future, and add Python to PATH or whatever that option is in their installer. Rename your /stable-diffusion-webui/venv folder to venv-old or something (you can honestly just delete it outright). Then try launching again. If it works, go and delete venv-old.

@sitte sitte closed this as completed Jan 24, 2023
@Liso7150
Copy link

image on 3.10.9 it dont work eather...

image

image
i have 3.10.7 and don't work still

@Liso7150
Copy link

http://download.pytorch.org/whl/cu117/torch-1.13.1%2Bcu117-cp310-cp310-win_amd64.whl - The wheel clearly exists.

It's because the cache in your venv folder still "remembers" that it couldn't find it. If you removed Python 3.11 entirely, just delete E:\Important\stable-diffusion-webui\venv completely. 99% sure it will then just work. If it doesn't, keep reading. And don't forget to close the issue if it does work...

Make sure you uninstalled Python 3.11 completely. py -0p will show you if it's still installed.

image

If you weren't using Python for anything else before webui, there's nothing wrong with uninstalling both 3.11 and 3.10, and then installing 3.10, as an administrator. Don't install Python "for current user only" - it is a source of many headaches, Ed boy.

Make sure to also install the py launcher when it asks you, also for all users, which will help you with any other version related shenanigans in the future, and add Python to PATH or whatever that option is in their installer. Rename your /stable-diffusion-webui/venv folder to venv-old or something (you can honestly just delete it outright). Then try launching again. If it works, go and delete venv-old.

deleted, but still same weel and problem reinstaled 3.10.7 for all users...

@vt-idiot
Copy link
Contributor

vt-idiot commented Jan 25, 2023

deleted, but still same weel and problem reinstaled 3.10.7 for all users...

Then it's a connectivity issue. Windows Firewall, or any 3rd party firewall you have is not letting Python connect to the server it needs to download the wheel. You'll have to figure that out.

You do have a supported nVIDIA GPU, right?

@vettorazi
Copy link

Same issue here. It's a brand new machine. I tried to turn off win. firewall, but same issue.
CUDA installed, Python 3.10 installed, etc.

@guzuligo
Copy link

guzuligo commented Feb 2, 2023

I had this issue before. Not sure if I remember exactly how I fixed it.
Try this: open cmd, activate the environment and use the following code from pytorch
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
Got it from here: https://pytorch.org/get-started/locally/

@SebastianEPH
Copy link

Tenía el mismo problema, lo resolví eliminando la carpeta 'venv',

image

@w-e-w w-e-w mentioned this issue Feb 10, 2023
1 task
@Konstanrinas2
Copy link

I had the same problem, completely uninstalling Python helped with installing 3.10.6 version 64-bit

@shangpapa
Copy link

I solved this problem by created python3.10 environment from conda.

@saiwondMYsty
Copy link

My solution is to uninstall the 11 version, and then enter 'python' in CMD, he will jump out of the Windows store version for you to install, I can use it normally after the installation is complete

@mizuhokaga
Copy link

mizuhokaga commented Feb 26, 2023

I had the same problem,I tried to use this args --no-cache-dir and finally torch installed successfully
sample:
python -m pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117 --no-cache-dir

@settkish
Copy link

python -m pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117 --no-cache-dir

Installing python3.10 and this command solved my pytorch install issue. Thanks for your help,

@vcashk
Copy link

vcashk commented Mar 2, 2023

Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu117
ERROR: Could not find a version that satisfies the requirement torch==1.13.1+cu117 (from versions: none)
ERROR: No matching distribution found for torch==1.13.1+cu117

@MierLu
Copy link

MierLu commented Mar 2, 2023

我试着安装Python 3.10.6就可以用了,我用3.11.2版本就不行了

yftzeng added a commit to yftzeng/stable-diffusion-webui-docker that referenced this issue Mar 4, 2023
… version to ensure the proper installation of stable-diffusion-webui

see more issue about stable-diffusion-webui here, AUTOMATIC1111/stable-diffusion-webui#7166
@zhnghc
Copy link

zhnghc commented Mar 5, 2023

I have met that issue , then I used python 3.10.6 ,the probleam solved

@Superluckysu
Copy link

QQ图片20230324020240
怎么解决啊

@AlizerUncaged
Copy link

I fixed all of this by uninstalling Python 3.11 and installing Python 3.10, I have no idea but it just works, maybe SD is not compatible with 3.11 at the moment.

I also checked and it works with 3.8 for some reason.

@MrNarcissus
Copy link

I just upgraded to python 3.10.9 or higher version and the problem solved and IDK why.
Try it may help.

@smalllazypig
Copy link

1 先卸载python3.11
2 下载python3.10.6 安装 https://www.python.org/downloads/windows/
3 删除 webui下的venv文件夹 stable-diffusion-webui\venv
4 重新执行webui.bat即可

@TaoYuan95
Copy link

My solution is to uninstall the 11 version, and then enter 'python' in CMD, he will jump out of the Windows store version for you to install, I can use it normally after the installation is complete

it works!!!!

@artisanfx
Copy link

I don't no if thats help you?
I faced the same issue and after some uninstall and install i found a solution that was resolved the issue for me.
I changed the settings of the config file ".\venv\pyvenv.cfg"

"Python311" to "Python310"

home = C:\Users\user\AppData\Local\Programs\Python\Python310
include-system-site-packages = false
version = 3.10
executable = C:\Users\user\AppData\Local\Programs\Python\Python310\python.exe
command = C:\Users\user\AppData\Local\Programs\Python\Python310\python.exe -m venv G:\stable-diffusion-webui\venv

@izixxxc
Copy link

izixxxc commented Apr 21, 2023

I had this issue with 32bit python (and git)
Uninstalled both and installed 64bit
Problem gone

@gavinv587
Copy link

launch.py
line: 228
torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117")

changed to:

torch_command = os.environ.get('TORCH_COMMAND', "pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu11"

@panikgit
Copy link

launch.py line: 228 torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117")

changed to:

torch_command = os.environ.get('TORCH_COMMAND', "pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu11"

You lost 7 at the end of the quoted command.

@mazieus
Copy link

mazieus commented May 5, 2023

launch.py line: 228 torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117")

changed to:

torch_command = os.environ.get('TORCH_COMMAND', "pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu11"

beautiful

@ChrisWang13
Copy link

ChrisWang13 commented Mar 19, 2024

I had this issue before. Not sure if I remember exactly how I fixed it. Try this: open cmd, activate the environment and use the following code from pytorch pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117 Got it from here: https://pytorch.org/get-started/locally/

That fixs my problem. Just change cu117 to the version of your cuda version by checking nvidia-smi

@matasoy
Copy link

matasoy commented Mar 23, 2024

please use python 3.10 see here - https://github.com/AUTOMATIC1111/stable-diffusion-webui#automatic-installation-on-windows installing python from microsoft store will grab python 3.11

I uninstal 3.10 today, because i have newer version. Now stablediffusion wont work because of torch 2.0.1 only works with 3.10.
And also i can not install 3.10 because of installer didnt let me to do, because there is a newer version 3.12. And i can not uninstall it because some of my project depends on 3.12........
There is no version of torch working with 3.12. But there are version of 3.8, 3.9, 3.10 and 3.11, what a sad stuation

@clonery
Copy link

clonery commented Jun 15, 2024

Still can't fix it, I lowered my python version from 3.12 to 3.10.6 tried to install package alone still the same please helpimage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance
Projects
None yet
Development

No branches or pull requests