AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
138.28k stars 26.28k forks source link

webui-user.bat error "No Python at 'c:\program files (x86)\python37-32\python.exe' #1359

Closed Fiztban closed 1 year ago

Fiztban commented 1 year ago

I was following both the .md and this video on how to install this webui.

I had multiple versions of python installed (python 2, 3.7 and 3.10) on my system, I updated to the latest 3.10.7 always installing PATH and double checking it is correct. It is.

When launching the webui-user.bat I get this error:

venv "C:\apps\AI\Stable_Diffusion_WebUI\venv\Scripts\Python.exe"
No` Python at 'c:\program files (x86)\python37-32\python.exe'`

I uninstalled all python versions and only installed python 3.10.7 (PATH and all, and restarted and check) and also modified the webui-user.bat to:

@echo off

set PYTHON="C:\Users\<USER>\AppData\Local\Programs\Python\Python310\python.exe"
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=

call webui.bat

Still get the same error. I am not sure what to do could you please advise?

Thank you.

ANTONIOPSD commented 1 year ago

mmm that's weird, it should ignore your version in PATH if you specify a python exe on "set PYTHON="

can you share a capture of the console when you run the webui-user.bat file?

Are you sure you are running webui-user.bat and not webui.bat?

The exactly steps are:

  1. Install Git

  2. Install Python 3

  3. Clone repo: git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

  4. Download model an place it in the correct folder

then

You want to use python in PATH? Run webui.bat

You want to use python in a custom directory? Modify webui-user.bat, add the custom python path in set "PYTHON=" and always use webui-user.bat to run the WebUI

Fiztban commented 1 year ago

Thank you for your quick response, I have followed exactly your steps in my attempts thus far for installing this SD webui. I have the latest Git 2.37.3-64bit.

I am not sure how to capture a console of when I run the webui-user.bat file, if you mean paste the terminal this is all I get:

PS C:\Users\<USER>> cd C:\apps\AI\Stable_Diffusion_WebUI
PS C:\apps\AI\Stable_Diffusion_WebUI> .\webui-user.bat
venv "C:\apps\AI\Stable_Diffusion_WebUI\venv\Scripts\Python.exe"
No Python at 'c:\program files (x86)\python37-32\python.exe'
Press any key to continue . . .
PS C:\apps\AI\Stable_Diffusion_WebUI> .\webui.bat
venv "C:\apps\AI\Stable_Diffusion_WebUI\venv\Scripts\Python.exe"
No Python at 'c:\program files (x86)\python37-32\python.exe'
Press any key to continue . . .

How would I go about capturing more information?

Fiztban commented 1 year ago

Strange I downloaded the latest version and this issue is gone it is now opening normally.

ANTONIOPSD commented 1 year ago

Strange I downloaded the latest version and this issue is gone it is now opening normally.

Nice!, enjoy your stay😉

warlander117 commented 1 year ago

I found the issue with this I think.

I had it too. But what I did to fix it was I installed Python for all users which made a directory in a different location. Then the webui-user.bat saw Python and ran normally.

nedfreetoplay commented 1 year ago

I had the same problem. I just reinstalled webui and it saw the PATH change.

ANTONIOPSD commented 1 year ago

I had the same problem. I just reinstalled webui and it saw the PATH change.

A way of fixing it is removing the venv folder, because it contains the path of the used python so if you move the main folder to another path, it will fail.

RemiFusade2 commented 1 year ago

A way of fixing it is removing the venv folder, because it contains the path of the used python so if you move the main folder to another path, it will fail.

Confirmed. Removing venv folder did the trick. Thank you!

Zanak4n commented 1 year ago

A way of fixing it is removing the venv folder, because it contains the path of the used python so if you move the main folder to another path, it will fail.

Thank you, kind stranger, it worked! :-)

casualkitten1 commented 1 year ago

I had the same problem. I just reinstalled webui and it saw the PATH change.

A way of fixing it is removing the venv folder, because it contains the path of the used python so if you move the main folder to another path, it will fail.

Thanks a lot

Nothin91 commented 1 year ago

I had the same problem. I just reinstalled webui and it saw the PATH change.

A way of fixing it is removing the venv folder, because it contains the path of the used python so if you move the main folder to another path, it will fail.

you da real mvp

baltz84 commented 1 year ago

I had the same problem. I just reinstalled webui and it saw the PATH change.

A way of fixing it is removing the venv folder, because it contains the path of the used python so if you move the main folder to another path, it will fail.

after reading this message instead of deleting this folder i edited the pyvenv.cfg to the 2 existing paths and that also fixed the issue

Shermoney99 commented 1 year ago

im having the same issue but my console is showing a different error (below) i have python 3.10 64bit installed on C/ but also tried on the drive that contains webui-user to no avail. its my first dealing with python and anything related to this thread so i dont know how to troubleshoot this :-/

Edit: im following this video https://www.youtube.com/watch?v=Po-ykkCLE6M

"Couldn't launch python

exit code: 9009

stderr: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

Launch unsuccessful. Exiting. Press any key to continue . . ."

purplemountain commented 1 year ago

I had the same problem. I just reinstalled webui and it saw the PATH change.

A way of fixing it is removing the venv folder, because it contains the path of the used python so if you move the main folder to another path, it will fail.

It works!!! Thanks!

gauravd19 commented 1 year ago

I followed all the steps to get stable diffusion. but in the last step, I couldn't find webui.bat in my folder. I tried repeating the process and it still doesn't show up. please help

Crusadercrush commented 1 year ago

@Shermoney99 Use the Python installer and choose "Modify"; then check the "Add Python to environmental variables" option and Install.

That fixed it for me.

ANTONIOPSD commented 1 year ago

Guys, the best way to solve it is by editing the pyvenv.cfg file inside de the venv folder and set the path of your python installation folder.

Example:

imagen

CaeseR112 commented 1 year ago

I had the same problem. I just reinstalled webui and it saw the PATH change.

A way of fixing it is removing the venv folder, because it contains the path of the used python so if you move the main folder to another path, it will fail.

Thanks for the help. Installing now. Hope it'll work.. <3

tyefrank commented 1 year ago

@Shermoney99 Use the Python installer and choose "Modify"; then check the "Add Python to environmental variables" option and Install.

That fixed it for me.

This was perfect. Nicely done

Prathamesh9967 commented 1 year ago

I had the same problem. I just reinstalled webui and it saw the PATH change.

A way of fixing it is removing the venv folder, because it contains the path of the used python so if you move the main folder to another path, it will fail.

damn it worked

farangizorzu1 commented 10 months ago

File "c:\Users\user\Desktop\wikibot\bot.py", line 5, in from aiogram import Bot, Dispatcher, executor, types ImportError: cannot import name 'executor' from 'aiogram' (C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiogram__init.py) PS C:\Users\user\Desktop\wikibot> & C:/Users/user/AppData/Local/Programs/Python/Python311/python.exe c:/Users/user/Desktop/wikibot/bot.py Traceback (most recent call last): File "c:\Users\user\Desktop\wikibot\bot.py", line 5, in from aiogram import Bot, Dispatcher, executor, types ImportError: cannot import name 'executor' from 'aiogram' (C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiogram\init__.py) PS C:\Users\user\Desktop\wikibot>

salengajds commented 8 months ago

I had the same problem. I just reinstalled webui and it saw the PATH change.

A way of fixing it is removing the venv folder, because it contains the path of the used python so if you move the main folder to another path, it will fail.

thank you. this worked.

for the record i had an issue with python 3.11 not being supported so I had to downgrade to 3.10 and got the error above. apparently it is still looking for the 3.11 path.

Marco-Jan commented 8 months ago

<3 thx for this post and help to fix this problem

pawel665j commented 7 months ago

Ребята, лучший способ решить эту проблему - отредактировать файл pyvenv.cfg внутри папки de venv и установить путь к папке установки python.

Пример:

imagen

You are a god

marlonfowler commented 7 months ago

Removing venv folder worked for me as well!

almanoduerme commented 6 months ago

I had the same problem. I just reinstalled webui and it saw the PATH change.

A way of fixing it is removing the venv folder, because it contains the path of the used python so if you move the main folder to another path, it will fail.

Thank you! The error was fixed.

humais1401 commented 4 months ago

U guys are best

dylanh724 commented 4 months ago

Guys, the best way to solve it is by editing the pyvenv.cfg file inside de the venv folder and set the path of your python installation folder.

Example:

imagen

This worked, but holy redundancy did you see that file?? Why not just set the path to the python exe or base dir, then have it base other paths based on this? Absolutely unnecessary.