Coder Social home page Coder Social logo

Looping venv. about audio-webui HOT 30 CLOSED

gitmylo avatar gitmylo commented on May 23, 2024
Looping venv.

from audio-webui.

Comments (30)

gitmylo avatar gitmylo commented on May 23, 2024 1

you didn't give enough context to chatgpt. this part of the script was written this way on purpose, to automatically activate the virtual environment. as you can't just swap interpreter mid-run. that's not possible.

the real reason you might be looping could be a few things, but it's probably this:

you're in a non-venv virtual environment (such as conda, pipenv, etc), which could not be detected (for whatever reason), but also not changed. (in which case the fix is usually to use the --skip-venv flag)

but before you do that, are you in a virtual environment? which operating system are you on? and which python version are you running with?

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024 1

I was referring to where you said you used ChatGPT to debug.
image

ChatGPT won't understand the code if you only show it the code from venv.py, because that's not enough context to understand the issue. The issue is not within the code, it's more of an issue with inconsistencies with some python versions.

Did it create a venv folder inside of your audio-webui directory? Also, do you have a version of python 3.10 installed? That's the only version known to be supported, as older versions don't support pipe characters for type annotations, and i believe there isn't a TTS package for 3.11 yet

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

Firstly, thank you for answering. Chatgpt? I thought this was an offline/local thing. Python 3.11.3. Windows 11.

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

Hehe sorry my bad. Yea python version was 3.11, I updated because it told me to, guess that was unwise. My whole process for making crap work is clearing error messages and there was a message about old version.

Now at Python 3.10.6. There is a venv folder. It still loops, and every time I test it it spins off a billion background processes and I have to reboot to clear them.

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

try activating the venv, and then running with --skip-venv. this should work, just requires a bit of manual steps

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

I shouldn't have to do that, it worked before I did the update. Who knew updating would wreck things so completely. Before I commit to the time it'll take to fully reinstall it I wanna run the thinking by you. I tried just deleing the venv folder and re-running install.bat but it looped again. I was hoping it would see the folder is missing and repair itself. Closing the terminal window doesn't end the processes so I'm wondering if reinstalling it would even help. Where is the loop coming from? Task manager shows a billion cmd and python instances with no upper level.

I ask because if the loop is somewhere outside the audio folder then reinstalling wont help will it.

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

reinstall? it doesn't have to reinstall if you just activate the venv and then run with --skip-venv, this will just skip the venv check.

i doubt an update of audio-webui caused the issue. as the venv activation code has been the same for the past month, if not longer.

it's not wrecked, it just isn't able to detect the venv, in which case it will try to activate it, and keep activating it because it keeps being unable to detect, --skip-venv changes this check to ignore this, and always continue.

if you delete the venv folder, you'll have to reinstall though, because all installed packages are stored in that folder.

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

No no, not like an update of anything inside Audio, I mean when I updated python to 3.11. It ran fine before. I generated some audio and everything. Running audio in a command window would give like a log of it's actions, and in that log I'd see yellow text saying your python is old you should update, use this command in a window, so I did. That's what apparently broke everything. Besides, I don't know what you even mean by "activate the venv" I mean I follow the logic, run the thing myself so it doesn't loop trying to run it itself. And I'm sure that would work but that's a hack, I want it to work normally, like it did before. I want to understand how venv broke, and how to fix it, that will be useful in the future I'm sure.

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

if you run py -3.10 -V does it tell you a version of python 3.10 or does it give an error?

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

if it does work,

  1. run py -3.10,
  2. then in that interpreter, run import sys
  3. then getattr(sys, "base_prefix", None) or getattr(sys, "real_prefix", None) or sys.prefix
  4. write the output down somewhere
  5. then activate your venv, and run python
  6. then run import sys again
  7. run sys.prefix

send me those 2 outputs, these 2 should not be the same when you're in a virtual environment.

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

py -3.10 -V
'py' is not recognized as an internal or external command,
operable program or batch file.

python --version
Python 3.10.6

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

you don't have python installed with py launcher? i'd suggest you do, that might be causing this somehow.
install python from https://www.python.org/, this is the official version, do NOT use the windows store version, as it is known to cause issues. like with some other projects. and the windows store version does not install py, which is pretty bad, because py lets you launch a specific version, otherwise you need a different command for everything.

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

Yea that's what I have. I don't use the windows store for anything.
image

But https://www.python.org/downloads/release/python-31012/ Doesn't seem to have an installer.

I have a feeling py is only broken because I uninstalled 3.11. (Via add/remove programs like normal.)

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

https://www.python.org/downloads/release/python-3108/

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

Yea that's what I have. I don't use the windows store for anything. image

But https://www.python.org/downloads/release/python-31012/ Doesn't seem to have an installer.

I have a feeling py is only broken because I uninstalled 3.11. (Via add/remove programs like normal.)

well, when the run script doesn't detect the py command, it will use the python command and pray that it's the right version, if you installed python 3.11, it overwrote your path to use that version, then uninstalling it clears the key, so it won't be on your path anymore.

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

py -3.10 -V
'py' is not recognized as an internal or external command,
operable program or batch file.

python --version
Python 3.10.8

Ahh I see.

I used Windows installer (64-bit)

It did not offer any options such as PATH changes.

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

py -3.10 -V 'py' is not recognized as an internal or external command, operable program or batch file.

python --version Python 3.10.8

Ahh I see.

I used Windows installer (64-bit)

It did not offer any options such as PATH changes.

path changes are on by default, and that's fine, because you'll normally be using the py launcher, and the python command for the latest version.

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

Ok.
image
image

I reran the installer, selected modify, I watched it say it installed the py launcher and still...

'py' is not recognized as an internal or external command,
operable program or batch file.

I tried again as admin.

Same problem. Why is it not installing the launcher?

Whenever I rerun the installer py launcher and associate are unchecked.

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

did you reopen the cmd? the path variable gets saved locally to the cmd when it opens, so if it gets changed while it's still open it won't recognise it until you reopen cmd.

if that isn't it, add the py executable to your path manually

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

How do I add it manually and why do I have to? it says it's installed.
image

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

So many pythons to choose from. I'm becoming a deeply frustrated herpetologist.

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

image
image
image

although in my case py is installed in C:/Windows directly

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

my path has
C:\Users\Innomen\AppData\Local\Programs\Python\Python310\Scripts
C:\Users\Innomen\AppData\Local\Programs\Python\Python310\

Where is py hiding?

naturally I can't just search for "py" I get all the pythons back.

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

I don't have py.exe anywhere. Is that not what it's called?

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

Wait I do have it in c: windows. Do I have to add windows itself to the path? Edit: JFC yes I do. Which is the dumbest shit in the world. py -3.10 -V
Python 3.10.8

Finally.

And install.bat still venv loops.

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

there must be something wrong somewhere, still. try following these steps again, and send me the output #33 (comment)

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

Oh yea sorry I forgot why we went down the py rabbit hole.

'C:\Users\Innomen\AppData\Local\Programs\Python\Python310'

python
Traceback (most recent call last):
File "", line 1, in
NameError: name 'python' is not defined

How do I "activate your venv"?

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

you can activate the venv by runnin the activate.bat which is (on windows) inside of venv\Scripts\activate.bat

from audio-webui.

Innomen avatar Innomen commented on May 23, 2024

Ok sorry for the delay. I've rerun the install with manual activate and skip venv, and now doing run. It's had to redownload some things. Once I can confirm I can get it running with manual and skip venv, I'll try again normally. I appreciate you taking the time to walk me through all this. I'm definitely learning things.

from audio-webui.

gitmylo avatar gitmylo commented on May 23, 2024

yeah, just remember to activate the venv every time you run, i also suggest --skip-install on future runs so it launches quicker

from audio-webui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.