Closed TheCarpetMerchant closed 1 year ago
Note : I saw #5410 and I have restarted the machine.
Having this same issue
Try and update pip
first.
"E:\AI\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install --upgrade pip
Also use the latest Python (3.10.8) if possible.
I tried Python .8 and 11.0, didn't work. Pip upgrading didn't work. What did work was using the docker image.
Having same issues there, Freshly installed.
You can't use 3.11 yet. It's not supported.
A friend of mine is getting the same error, on 3.10.6, fresh setup
The error seems related to an unsupported version of Python.
I had previously installed 3.11 and it isn't supported. I later installed Python 3.10.6, but stable-diffusion-webui had already created a virtual environment with the previously installed unsupported version of Python upon first run. Resetting the virtual environment resolved this error for me.
Here are steps I used to resolve this error on Windows 11:
venv
directorywebui.bat
to re-establish the stable-diffusion-webui virtual environment (venv
directory will be recreated with Python 3.10.6).Perhaps the Python version could be checked for a supported version prior to creating the virtual environment to avoid this error.
The error seems related to an unsupported version of Python.
I had previously installed 3.11 and it isn't supported. I later installed Python 3.10.6, but stable-diffusion-webui had already created a virtual environment with the previously installed unsupported version of Python upon first run. Resetting the virtual environment resolved this error for me.
Here are steps I used to resolve this error on Windows 11:
- Delete the
venv
directory- Install Python 3.10.06
- Run
webui.bat
to re-establish the stable-diffusion-webui virtual environment (venv
directory will be recreated with Python 3.10.6).Perhaps the Python version could be checked for a supported version prior to creating the virtual environment to avoid this error.
I think it does, but only downwards. I was once told that I was running an unsupported version of Python, but it worked since it was a 3.9.
Try and update
pip
first."E:\AI\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install --upgrade pip
Also use the latest Python (3.10.8) if possible.
Besides the obvious (changing the directory to my own directory) this resolved my issue.
I'm still having the issue on my machine. The culprit is clearing the resolution of the torch version, but since the docker image works without trouble I'm unsubscribing from this issue but leaving it open for others. Good luck guys,
A friend of mine is getting the same error, on 3.10.6, fresh setup
If he tried first with other version of python the error continue; I delete the folder, downloaded again and tried with version 3.10.6 of python, because I haved the same issue, the problem was solved.
If you bother to check out Pytorch's official website, they stated clearly that support is from python 3.7 to 3.10 (3.9 on the website but 3.10 is actually supported). This is not a bug.
If you bother to check out Pytorch's official website, they stated clearly that support is from python 3.7 to 3.10 (3.9 on the website but 3.10 is actually supported). This is not a bug.
I bothered.
https://pytorch.org/get-started/locally/
It just says that Linux distributions usually come with 3.7.
And then it says that they recommend to use 3.6, 3.7 or 3.8.
If 3.10 is supported, then our is at least not recommended, nor is 3.9.
And if 3.10 "is supported" as you say, then 3.10.6 is since the last digit according to semver just means that it is the sixth patch of the same minor version that you claim the Web UI requires. Thus is should work. It doesn't, because 3.10 is not supported.
This is on par with the very clear message on the same page (Windows button):
"Currently, PyTorch on Windows only supports Python 3.7-3.9".
Oops. No version of Python past 3.9 is supported...
So the developer should actually revert the Python requirement to 3.9 or even 3.8 as this might clear up a lot of issues people have. I bet that most people use this repo on Windows which means the developer should agere to the supported versions as specified on the official website.
Usually, you don't set a requirement that all operating systems cannot work with.
(BTW PyTorch 2 looks very interesting)
@cooperdk
@TheCarpetMerchant If you are still having issue, here is a fix 100% will work (make sure your pip is Python 3.10 pip, not from any other python installations):
download https://download.pytorch.org/whl/cu113/torch-1.12.1%2Bcu113-cp310-cp310-win_amd64.whl manually
pip install torch-1.12.1+cu113-cp310-cp310-win_amd64.whl
@cooperdk
- the OP is using windows so no point seeing Linux requirements.
- Yes you are reading wrongly. It says Python 3.7 or greater is generally installed by default on any of our ...
- 3.10 is supported, the website is outdated. You can manually look up the wheel files in https://download.pytorch.org/whl/torch/
Sorry, I misread that page and mistyped stuff including the 3.6 reference and spent some time editing it. That they have a wheel for 3.10 doesn't mean they support it, just that they provide it. It is not pip available so I guess they dont really support it. (I honestly don't remember if torch bothers to provide their works thru pip).
Support for 3.10 is not clearly stated on the official website which is what I (and most other people and developers) choose to adhere to. Because they dont clearly, OFFICIALLY support it.
The page says Python 3.6 minimum for Linux, 3.7 for Windows, and up to and including 3.9 for both platforms. Not 3.10 regardless of the wheel repo. An auto dealer might also sell a tire that cannot be mounted on their cars, but state what tires can be mounted on their website.
Thats a very funny opinion..whats the point of providing wheels if its not supported? Do you know what are wheels? They are compiled version of the library against a specific Python version. If it compiled successfully, it is supported. So many others have used this repo and python 3.10 without issues. The only few issues raised by people are all due to their environment causing them to somehow not use a supported python version (like 3.11) or venv related issues. Why not we let the OP try my suggested solution of installing from wheel directly first? If he can get it work, then it is supported and there is no need for debate already.
Thats a very funny opinion..whats the point of providing wheels if its not supported? Do you know what are wheels? They are compiled version of the library against a specific Python version. If it compiled successfully, it is supported.
I don't find it funny. Most software developers officially state what they support and what they don't support. Du does pytorch on the page I referred to.
I used to be a programmer for the company that developed the Bluetooth stack, drivers and software suite. I know what support means. It means that there is a clear, official message about what is supported. You can release software that is not supported because it requires testing. This was specifically what I worked with, actually. Anybody could compile anything if they wanted to. That it compiles and you toss it on a webserver does not mean it is supported.
Lessons learned from install & this post:
1) Don't mix your Python installs, set your PATH variables correctly. (By making Python 3.11 the default PATH I recreated the error when opening webui-user.bat). 2) If Python installs were mixed (maybe you had Python 3.11 installed), delete venv folders, then open webui-user.bat again. This will generate venv again with your current Python version in PATH which shouldn't be 3.11. 3) Follow repo instructions, e.g. the repo says to install Python 3.10.6 but the library says it supports up to 3.9.... just follow repo instructions unless you're a dev in the project...
Hopefully this helps
The error seems related to an unsupported version of Python.
I had previously installed 3.11 and it isn't supported. I later installed Python 3.10.6, but stable-diffusion-webui had already created a virtual environment with the previously installed unsupported version of Python upon first run. Resetting the virtual environment resolved this error for me.
Here are steps I used to resolve this error on Windows 11:
- Delete the
venv
directory- Install Python 3.10.06
- Run
webui.bat
to re-establish the stable-diffusion-webui virtual environment (venv
directory will be recreated with Python 3.10.6).Perhaps the Python version could be checked for a supported version prior to creating the virtual environment to avoid this error.
thank you for this
this worked perfectly
Confirming 3.11 was my issue. Running 3.10.9 is now installing torch/torchvision as expected.
@ClashSAN think we should close this
I created a venv for Python 3.10.6, but I still get the error:
RuntimeError: Couldn't install torch. Command: "C:\Users\James\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
Press any key to continue . . .
(automatic) C:\Users\James\stable-diffusion-webui>python --version Python 3.10.6
download https://download.pytorch.org/whl/cu113/torch-1.12.1%2Bcu113-cp310-cp310-win_amd64.whl manually pip install torch-1.12.1+cu113-cp310-cp310-win_amd64.whl @jameswan
@aliencaocao I tried that: (automatic) C:\Users\James\stable-diffusion-webui>pip install torch-1.12.1+cu113-cp310-cp310-win_amd64.whl --force-reinstall Processing c:\users\james\stable-diffusion-webui\torch-1.12.1+cu113-cp310-cp310-win_amd64.whl Collecting typing-extensions Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB) Installing collected packages: typing-extensions, torch Attempting uninstall: typing-extensions Found existing installation: typing_extensions 4.4.0 Uninstalling typing_extensions-4.4.0: Successfully uninstalled typing_extensions-4.4.0 Attempting uninstall: torch Found existing installation: torch 1.12.1+cu113 Uninstalling torch-1.12.1+cu113: Successfully uninstalled torch-1.12.1+cu113 Successfully installed torch-1.12.1+cu113 typing-extensions-4.4.0
But I still get the error: 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
Are you inside the venv when you ran those commands?
Can you try "C:\Users\James\stable-diffusion-webui\venv\Scripts\python.exe" --version
please?
Hi everyone, I just went and downloaded Python 3.10.6 for Windows from https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe
I opened a basic command prompt via cmd.exe, rather than Anaconda prompt. Did not activate a venv
I did this again: C:\Users\James>git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
C:\Users\James\stable-diffusion-webui>webui-user.bat Creating venv in directory venv using python "C:\Users\James\AppData\Local\Programs\Python\Python310\python.exe" venv "C:\Users\James\stable-diffusion-webui\venv\Scripts\Python.exe"
Then I executed webui-user.bat
Now its progressing with installing everything ...
@jameswan you definitely did not install into the venv properly. If torch exists, it would not try to install again. As for your working attempt, you are installing global packages and making venv to inherent them. Works too, but you need to beware that any modification to torch outside of venv will also affect the SD webui
@aliencaocao could you please explain your reply above further?
On my first attempt I first created an Python 3.6.10 environment in Windows (I had not downloaded the Python 3.6.10 .exe as I was using Python 3.11) with: conda create -n automatic Python=3.10.6 activate automatic
then proceeded to execute webui-user.bat
which then resulted in the error message as per above, which was: 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
Why the hell are you using conda when the ui is developed for venv..?
Den 7. jan. 2023 07.36, fra 07.36, James @.***> skrev:
@aliencaocao could you please explain your reply above further?
On my first attempt I first created an Python 3.6.10 environment in Windows (I had not downloaded the Python 3.6.10 .exe as I was using Python 3.11) with: conda create -n automatic Python=3.10.6 activate automatic
then proceeded to execute webui-user.bat
which then resulted in the error message as per above, which was: 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
-- Reply to this email directly or view it on GitHub: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/5485#issuecomment-1374392498 You are receiving this because you were mentioned.
Message ID: @.***>
@cooperdk Just used to using conda.
@jameswan conda does not work...i dont know who gave you the idea/instruction to make venv using conda, but no, it does not work. Delete the venv folder and uninstall conda and try again.
@jameswan conda does not work...i dont know who gave you the idea/instruction to make venv using conda, but no, it does not work. Delete the venv folder and uninstall conda and try again.
If that's the case, then the Wiki should be updated. https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs#alternative-installation-on-windows-using-conda
this error always happened with some warn log like
WARNING: You are using pip version 20.2.3; however, version 23.0.1 is available.
You should consider upgrading via the '~/stable-diffusion-webui/venv/bin/python3 -m pip install --upgrade pip' command.
try to copy the command and execute, things will be fine !
this error always happened with some warn log like
WARNING: You are using pip version 20.2.3; however, version 23.0.1 is available. You should consider upgrading via the '~/stable-diffusion-webui/venv/bin/python3 -m pip install --upgrade pip' command.
try to copy the command and execute, things will be fine !
You can ignore this warning, it doesnt affect anything as far as this repo is concerned
Try and update
pip
first."E:\AI\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install --upgrade pip
Also use the latest Python (3.10.8) if possible.
this is work for me.
Unable to install torch 2.4.1 on python 3.11.2
pip index versions torch
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
torch (2.2.2)
Available versions: 2.2.2, 2.2.1, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.1, 2.0.0
trying to install 2.4.1 results in error
ERROR: Could not find a version that satisfies the requirement torch<3.0.0,>=2.3.0 (from surya-ocr) (from versions: 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2)
ERROR: No matching distribution found for torch<3.0.0,>=2.3.0
You install torch from their own source. Read their guide.
Is there an existing issue for this?
What happened?
Steps to reproduce the problem
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
webui-user.bat
What should have happened?
The project should use an available version of torch.
Commit where the problem happens
44c46f0ed395967cd3830dd481a2db759fda5b3b
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
No response
Additional information, context and logs
No response