stable-diffusion-webui
stable-diffusion-webui copied to clipboard
ERROR: Could not find a version that satisfies the requirement
Describe the bug I am not coding literate, but I will be as concise as possible while filling out this form. Please feel free to ask me for anything else that may be needed. Really all I have is the error text and an assumption.
To Reproduce Steps to reproduce the behavior:
- Go to 'C:\stable-diffusion\Autowebui'
- Click on 'webui-user.bat'
- Wait while the command runs and calls webui.bat
- See error:
Creating venv in directory venv using python "C:\Program Files (x86)\Python310-32\python.exe"
venv "C:\stable-diffusion\Autowebui\venv\Scripts\Python.exe"
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 13:51:36) [MSC v.1933 32 bit (Intel)]
Commit hash: <none>
Installing torch
Traceback (most recent call last):
File "C:\stable-diffusion\Autowebui\launch.py", line 96, in <module>
run(f'"{python}" -m {torch_command}', "Installing torch", "Couldn't install torch")
File "C:\stable-diffusion\Autowebui\launch.py", line 44, in run
raise RuntimeError(message)
RuntimeError: Couldn't install torch.
Command: "C:\stable-diffusion\Autowebui\venv\Scripts\python.exe" -m pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
Error code: 1
stdout: Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
stderr: ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu113 (from versions: none)
ERROR: No matching distribution found for torch==1.12.1+cu113
I have tried a manual install:
C:\stable-diffusion\Autowebui>pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu113 (from versions: none)
ERROR: No matching distribution found for torch==1.12.1+cu113
Expected behavior After following the instructions precisely in the Readme, expected behavior is for install to complete.
Screenshots
Desktop (please complete the following information):
- OS: Windows 10 Pro 19044.2006 (21H2) Feature Experience Pack 120.2212.4180.0
- Browser Chrome, Firefox, Edge
- Commit revision 8a32a71ca3223cf7b0911fe55db2c6dece2bacca
Additional context I have all the pre-requisites and dependencies. Python is in my path. I have run the install as non-administrator (README) and tried it as administrator. I have use the command prompt and the Miniconda3 prompt. I have cloned it to different directories in the root of my C: drive.
I like the interface on this UI, and would like to use it do to more options than the others I tried. I don't understand the error, but I assume that it cannot find the version of pytorch that I need. Any help is welcome, thank you.
Installation instructions say:
Install Python 3.10.6, checking "Add Python to PATH"
Have you tried to use Python 3.10.6
instead of 3.10.7
?
Removed 3,10.7, installed 3.10.6, made sure it was in the PATH, rebooted:
Installation instructions say:
Install Python 3.10.6, checking "Add Python to PATH"
Have you tried to use Python
3.10.6
instead of3.10.7
?
From what I can see, it doesn't exist.
You can also specify the path to your Python 3.10.6 directly in webui-user.bat, that's what I ended up doing to fix the same error:
set PYTHON=C:\Users\Main\AppData\Local\Programs\Python\Python310\python.exe
(You might need quotes if it's in a folder path that has spaces in it)
You can also specify the path to your Python 3.10.6 directly in webui-user.bat, that's what I ended up doing to fix the same error:
set PYTHON=C:\Users\Main\AppData\Local\Programs\Python\Python310\python.exe
(You might need quotes if it's in a folder path that has spaces in it)
It is finding Python, but cannot install a torch version. The torch it is looking for doesn't exist... It should be using torch 11.6.
So I manually switched it to version 11.6:
C:\stable-diffusion\Autowebui\stable-diffusion-webui>python.exe -m pip install torch --extra-index-url https://download.pytorch.org/whl/cu116
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu116
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
Just did a pull to get the most recent changes, and tried again. Same error. Is there anything I can do to give more information to help fix this issue?
Is there a Discord for support?
C:\stable-diffusion\Autowebui\stable-diffusion-webui>webui
venv "C:\stable-diffusion\Autowebui\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 13:51:36) [MSC v.1933 32 bit (Intel)]
Commit hash: 1a1f7e85c772e48ed923470f62ec2d32f9ff361f
Installing torch and torchvision
Traceback (most recent call last):
File "C:\stable-diffusion\Autowebui\stable-diffusion-webui\launch.py", line 108, in <module>
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch")
File "C:\stable-diffusion\Autowebui\stable-diffusion-webui\launch.py", line 55, in run
raise RuntimeError(message)
RuntimeError: Couldn't install torch.
Command: "C:\stable-diffusion\Autowebui\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
Error code: 1
stdout: Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
stderr: ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu113 (from versions: none)
ERROR: No matching distribution found for torch==1.12.1+cu113
Does anyone have torch-1.12.1+cu113-cp310-cp310-win
wheel for Windows 10 intel/nvidia 3xxx? I can install it manually and see if that fixes the error...
@y0himba I'm java developer myself and I don't have much python experience, but I could try to help. Add me on discord Gugushkis#9087
Nothing is working here. Other UIs are working with no issues, but looking at the screenshots I want to use this one.
Edition Windows 10 Pro
Version 21H2
Installed on 6/22/2021
OS build 19044.2006
Experience Windows Feature Experience Pack 120.2212.4180.0
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 13:51:36) [MSC v.1933 32 bit (Intel)] on win32
nVidia RTX 3080 driver version 516.94 (Latest)
Python is in my PATH
Why are you still using Python 3.10.7 instead of 3.10.6? Did you even try pointing it to your 3.10.6 executable manually in webui-user.bat instead of relying on the PATH variable?
The reason I'm asking is because I had that exact message of "ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu113" and wasted a bunch of time fiddling around with Torch instead of fixing the Python version.
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/704#issuecomment-1251287507
Yes. I did, and as you can read above, the error persisted.
Edit: I also specified the path to Python in webui-user.bat
Tried with and without quotes because Windows.
Why are you still using Python 3.10.7 instead of 3.10.6? Did you even try pointing it to your 3.10.6 executable manually in webui-user.bat instead of relying on the PATH variable?
The reason I'm asking is because I had that exact message of "ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu113" and wasted a bunch of time fiddling around with Torch instead of fixing the Python version.
Just updated to the latest, still getting the error:
Installing torch and torchvision
Traceback (most recent call last):
File "C:\stable-diffusion\Autowebui\stable-diffusion-webui\launch.py", line 108, in <module>
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch")
File "C:\stable-diffusion\Autowebui\stable-diffusion-webui\launch.py", line 55, in run
raise RuntimeError(message)
RuntimeError: Couldn't install torch.
Command: "C:\stable-diffusion\Autowebui\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
Error code: 1
stdout: Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
stderr: ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu113 (from versions: none)
ERROR: No matching distribution found for torch==1.12.1+cu113
I did a fresh install, same error. I have no clue what is going on here, every other SD UI and command line I use works. I am in love with this UI after running it in a collab. This is the one I would love to use. So many more options than the others, and a bit faster to be honest. I am able to whittle down the image I want to create.
Maybe some has the version of torch, or the distribution I need for this? If I can grab it, then have someone tell me where an how to install or put it, it may work. When I create a link on the Pytorch web site, it installs on my machine, but the UI still says I need it. I think I need to install it manually. I have even tried the detailed setup readme.
Installing torch and torchvision
Traceback (most recent call last):
File "C:\stable-diffusion\Autowebui\launch.py", line 108, in <module>
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch")
File "C:\stable-diffusion\Autowebui\launch.py", line 55, in run
raise RuntimeError(message)
RuntimeError: Couldn't install torch.
Command: "C:\stable-diffusion\Autowebui\venv\Scripts\python.exe" -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
Error code: 1
stdout: Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
stderr: ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu113 (from versions: none)
ERROR: No matching distribution found for torch==1.12.1+cu113
I just want to chime in and say I am having the same issue. I was running the previous version of the guide on my laptop on windows 10 with a 3060 gpu and decided to update to this version. Its working fine on my desktop with a 2070 gpu, but on my laptop Im getting the same torch error as above.
According to the pytorch website "Currently, PyTorch on Windows only supports Python 3.7-3.9" https://pytorch.org/get-started/locally/ I assume 3.10 would not be a breaking change but something is happening as I am having the same issue.
I tried 3.6, 3.7, 3.8 and 3.9, removing the PATH statement and using a new one for each install. Got the error no matter which version I used.
python -c "import torch; print(torch.cuda.is_available())"
returns True
.
I've also tried manually setting the path to python.exe in webui-user.bat
.
Also, created install links using pip and Conda from https://pytorch.org/get-started/locally/
none of which worked.
I tried completely removing all Python, removing the install directory, restarting, cloning the repo, and starting from scratch. Same error. Then I removed the directory and followed the step by step manual install instructions on the Wiki,, same error.
I also get the same error on my son's computer with a 3070 in it. I repeated all the steps above.
I am able to use any other UI, Gradient, Streamlit, Custom or even Windows based rather than web, all of which work. However, as I said above, this UI has many more options and is easier to use. I would prefer this one.
Edition Windows 10 Pro Version 21H2 Installed on 6/22/2021 OS build 19044.2006 Experience Windows Feature Experience Pack 120.2212.4180.0
Hi y0himba
I managed to get mine working, I do not know exactly which steps of the many I tried got it working but I think these two are the key Pointing my user_webui python= at my anaconda3 install setting VENV_DIR=- [minus sign (to disable?)] it re-downloaded the repo and other files into a repositories dir (maybe some updates are what actually fixed it)
I also did these but I don't think they are relevant Running the conda install for torch, copying torch files into Lib from my conda install (and removing), updating pip, conda etc...
Good luck, thanks your persistence gave me hope and ideas for things to try, hope something here can get it working for you.
https://www.reddit.com/r/StableDiffusion/comments/xeot7w/trying_to_install_automatic1111s_webui/ https://rentry.org/voldy#-alternate-guide-conda-
@tallbird Man this took me down a few hour rabbit hole of new ideas. After 3+ hours of tinkering I was able to use Voldy's Conda guide (from your 2nd link) to get things running! I am now able to use it.
This needs to be addressed by the authors/coders, so that this much work for a work around isn't needed. It was worth the work though...
Okay, so thanks to @tallbird I have found this method to work each time there is an issue installing torch for a Stable Diffusion UI or install. This may work with other dependency or package issues as well. I have used it on 2 different UI installs, this one, and another that I am not sure it's proper to name since it might send users over there.
I hope this helps someone else!
This is for WINDOWS OS.
This comes from https://rentry.org/voldy#-alternate-guide-conda- and requires Miniconda- https://docs.conda.io/en/latest/miniconda.html (install it first if you don't have it)
-
Clone the git you are working with. You can create a folder to clone it into, then go into that folder , open a command prompt/terminal/powershell prompt.
-
Type
git clone https://url-of-github-project
Example:git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
using the .git extension on the end works as well. -
Open your Miniconda prompt and switch to the repo directory. Let's say I created a directory called "stable-diffusion-webui' on my C: drive, at the root. I would open the Miniconda prompt and navigate to the directory.
cd c:\stable-diffusion-webui
or whatever commands required to get there. -
Once in the repo folder, create a new environment using
conda create --name whatever
with whatever being whatever name you want. Be sure you are in your repo folder. -
Next, make sure the environment is active so we are working in it. Use
conda activate whatever
or justactivate whatever
since you are using the Miniconda prompt. "whatever" is what you named your environment. -
Now we are working in our environment. Your Miniconda prompt should say
(whatever) C:\stable-diffusion-webui>
which shows us that is the environment we are using. -
Now, we install Python into that environment. Use
Conda install python
. You may get an OpenSSL error. To fix that, install OpenSSL for Windows from https://slproweb.com/products/Win32OpenSSL.html then to insure it is working typeopenssl version
. OpenSSL must be in your PATH to work, and you may need to restart the Miniconda prompt to refresh the PATH. If it is working, you'll get a return ofOpenSSL 1.1.1q 5 Jul 2022
or similar. -
Install git into the environment. Use
conda install git
You should be ready to rock and roll at this point. Next you'll run the command to start your UI and Stable Diffusion. For this repo, Automatic1111, that would be webui-user.bat
. It will then automagically install everything else you need. When you see Running on local URL: http://127.0.0.1:7600
just put that in your web browser and go to it. This will vary depending on what repo or UI you are using.
Note: for this repo, you'll need to disable the virtual environment (VENV). Edit webui-user.bat
in the editor of your choice, Notepad works just fine. Find the line that says set VENV_DIR=
and add a minus sign/dash after the equals symbol. It should look like this: set VENV_DIR=-
save it, then making sure you are in the correct environment, (conda activate whatever) run webui-user.bat
Note 2: Using this method requires you to activate the environment each time.
I ran into this issue, and was able to get around it by just creating a python 3.9 virtual environment, and pointing to that in webui-user.bat. No additional configuration was necessary.
I met the same problem. It seems that there are Python Enviroment conflict between Anaconda and official Python.org. So I uninstall the python.org one, reinstall Anaconda (Add Anaconda to PATH while installing), make sure that Anaconda is the only Python in my computer. Finally the bat file run without Error.
this is an old issue which is fixed and no longer seems relevant, if this issue is related to future issues, please refer to this previous one.
I'm faced this problem too... And finded a solution with help of this branch!
-
Download and Install Python 3.10.6
-
fill vars in
webui-user.bat
like thisset PYTHON
=C:\Users\
username\AppData\Local\Programs\Python\Python310\python.exe
set VENV_DIR
=-
[yep, need minus's char] -
Run
webui-user.bat
non-admin (not shure that matter...)
Simple, but worked for me. Maybe help to you too... i hope.
this method worked for me. thank you very much!