AlizerUncaged / desktop-waifu

Desktop Waifu!
334 stars 49 forks source link

Help please #226

Open X4NTH5S opened 9 months ago

X4NTH5S commented 9 months ago

File "C:\desktop-waifu-master\waifu\Src\runner.py", line 2, in import openai, humanize, os, sys, time, threading, asyncio, signal, json ModuleNotFoundError: No module named 'openai'

DreikalCC commented 9 months ago

Hello I had the same problem, what I did is the following:

pip install openai

after it installs it, it kept displaying the same error, but everytime I installed the openai, i would say it was already installed, there is another problem that is similar, the no colorama one, what you have to do is go to the python folder:

D:\Users\aldoa\AppData\Local\Programs\Python\Python311\Lib\site-packages there will be a folder named openai, copy it and paste it here:

D:\AIda\desktop-waifu\waifu\Src

that is the dir on my computer, just check what it would be on yours, I guess it would be on C:

this type of fix seems to work on a few problems

X4NTH5S commented 9 months ago

How do I place this command?

pip install openai

from colorama import *
import openai, humanize, os, sys, time, threading, asyncio, signal, json
from rich.console import Console

Or like this?

from colorama import *
import openai, humanize, os, sys, time, threading, asyncio, signal, json
from rich.console import Console

pip install openai

I don't know how to use github or cmd but I have seen a little bit so if you can help me I would appreciate it, because as far as I know, it is edited in a file called runner.py

DreikalCC commented 8 months ago

to copy the folder just do it like you do on windows, no need for the cmd, only the pip install openai needs the cmd

DreikalCC commented 8 months ago

but what ultimately helped me resolve everything was: inside the waifu folder there us a file named pyvenv.cfg, open it with a code editor or text editor. there you will see 3 lines:

home = D:\Users\aldoa\AppData\Local\Programs\Python\Python311 include-system-site-packages = false version = 3.11.0

the line that says home is where all the python stuff get installed, that is my computers directory, yours should be on a similar path, just correct it for yours, then also check your python version and correct it if needed.

after that try running the start.bat to see if you have everything installed, if everything is installed already the program will run, if not it will start asking for you to install whatever is missing, if you want to simply install all of them without checking every time running the start.bat use the following command:

pip install -r requirements.txt

it should install all the requirements from the txt file, remember that you have to have the cmd on the same directory where the txt file is located so it can find it, that is all I did and it fixed everything, and is now running

X4NTH5S commented 8 months ago

Thank you, I already solved it thanks to your help although now I have another problem and that is that when I want to talk, the key does not respond and neither does the Ai speak.

The message that appears to me, which I think is the one that gives errors, is this:

You are in a virtual environment: "C:\desktop-waifu-master\waifu"

C:\desktop-waifu-master\waifu\Lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
   warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)