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

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

Closed
Fiztban opened this issue Sep 30, 2022 · 28 comments

Comments

@Fiztban
Copy link

Fiztban commented Sep 30, 2022

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
Copy link
Contributor

ANTONIOPSD commented Sep 30, 2022

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
Copy link
Author

Fiztban commented Sep 30, 2022

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
Copy link
Author

Fiztban commented Oct 1, 2022

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

@ANTONIOPSD
Copy link
Contributor

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

Nice!, enjoy your stay😉

@warlander117
Copy link

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
Copy link

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

@ANTONIOPSD
Copy link
Contributor

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
Copy link

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
Copy link

Zanak4n commented Jan 4, 2023

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
Copy link

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
Copy link

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
Copy link

baltz84 commented Feb 27, 2023

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
Copy link

Shermoney99 commented Mar 2, 2023

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
Copy link

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
Copy link

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
Copy link

@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
Copy link
Contributor

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
Copy link

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
Copy link

@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
Copy link

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
Copy link

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
Copy link

salengajds commented Nov 29, 2023

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
Copy link

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

@pawel665j
Copy link

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

Пример:

imagen

You are a god

@marlonfowler
Copy link

Removing venv folder worked for me as well!

@almanoduerme
Copy link

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
Copy link

U guys are best

@dylanh724
Copy link

dylanh724 commented Apr 8, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests