[Bug]: ERROR: Could not find a version that satisfies the requirement torch==1.13.1+cu117
sitte opened this issue · comments
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
- Run webui-user.bat
- wait
What should have happened?
The script should do all the work and run
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
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
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.
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
.
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.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 tovenv-old
or something (you can honestly just delete it outright). Then try launching again. If it works, go and deletevenv-old
.
deleted, but still same weel and problem reinstaled 3.10.7 for all users...
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?
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.
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/
I had the same problem, completely uninstalling Python helped with installing 3.10.6 version 64-bit
I solved this problem by created python3.10 environment from conda.
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
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
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,
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
我试着安装Python 3.10.6就可以用了,我用3.11.2版本就不行了
I have met that issue , then I used python 3.10.6 ,the probleam solved
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.
I just upgraded to python 3.10.9 or higher version and the problem solved and IDK why.
Try it may help.
1 先卸载python3.11
2 下载python3.10.6 安装 https://www.python.org/downloads/windows/
3 删除 webui下的venv文件夹 stable-diffusion-webui\venv
4 重新执行webui.bat即可
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!!!!
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
I had this issue with 32bit python (and git)
Uninstalled both and installed 64bit
Problem gone
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"
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.
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
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
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