AlizerUncaged / desktop-waifu

Desktop Waifu!
336 stars 48 forks source link

No Python? #33

Open SloferTheLazy opened 1 year ago

SloferTheLazy commented 1 year ago

No Python at 'C:\Users\flandre-real\AppData\Local\Programs\Python\Python310\python.exe' Press any key to continue . . .

SloferTheLazy commented 1 year ago

thought i fixed it nvm

hiyata commented 1 year ago

Having the same issue, not sure why it's looking for python in "flandre-real" ....

SloferTheLazy commented 1 year ago

ive been tryna look for the cause in all the files, no luck

hiyata commented 1 year ago

Okay I figured it out, there are a bunch of things that need to be done. First, go into \desktop-waifu\waifu pyvenv and change the home = C:Path\to\your\python310 . Change the version to match yours. Next, go into desktop-waifu\waifu\Src and open runner.py .

Load settings from .env file with open('D:/desktop-waifu/example.env') as f: for line in f: line = line.strip() if not line or line.startswith("#"): continue key, value = line.split('=', 1) os.environ[key] = value

Change "with open(Path/to/example.env)" shown above. Next go to D:\desktop-waifu\waifu\Src\utils vtube_studio.py and search for "icon".

def get_icon(): with open('D:/desktop-waifu/repo/icon.png', 'rb') as file: encoded_string = base64.b64encode(file.read()) return encoded_string.decode('utf-8')

replace "with open(path/to/repo/icon.png)"

lastly you have to run runner.py from SRC directory so in the \desktop-waifu\waifu\Src run "python runner.py" and it should work. There was a lot I'm sure there's a better way but this is what I was able to do.

SloferTheLazy commented 1 year ago

ill let you know if this fixed it

SloferTheLazy commented 1 year ago

with open('D:/desktop-waifu/example.env') as f:

does it have to be (Path\to\example.env) i put (C:\Users(my user)\waifu\desktop-waifu\example.env)

SloferTheLazy commented 1 year ago

it still says no python at (C:(example)(example)\etc..)

SloferTheLazy commented 1 year ago

nevermind fixed it

SloferTheLazy commented 1 year ago

File "C:\Users\green\waifu\desktop-waifu\waifu\Src\runner.py", line 10 with open('C:\Users\green\waifu\desktop-waifu\example.env') as f:

SloferTheLazy commented 1 year ago

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

SloferTheLazy commented 1 year ago

it points to the final bracket

SloferTheLazy commented 1 year ago

@AlizerUncaged

Shonatan commented 1 year ago

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

yea having same issue

motormonster commented 1 year ago

@hiyata @SloferTheLazy @Shonatan hi so i was having the issue too and found that the original code was fine. the program changes the name of the file to just '.env'. so leave it as " '.env' "

Load settings from .env file

with open('.env') as f: for line in f: line = line.strip() if not line or line.startswith("#"): continue key, value = line.split('=', 1) os.environ[key] = value

    this should be fine
furkanshaikh313 commented 1 year ago

I got the same error please help me to fix it

No Python at 'C:\Users\HP\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\python.exe' Press any key to continue . . .

motormonster commented 1 year ago

so in your pyvenv.cfg there should be a line at the top looking for python310. should look like

C:\Users\"insert your user here"\AppData\Local\Programs\Python\Python310

you may need to install python 310 again. @furkanshaikh313

motormonster commented 1 year ago

this should fix it for whatever reason.

comment out the rest of the code, and paste this in

import sys import os

python_home = os.path.dirname(sys.executable)

pyvenv_cfg_path = os.path.join(python_home, 'pyvenv.cfg')

with open(pyvenv_cfg_path, 'r+') as cfg_file: lines = cfg_file.readlines() cfg_file.seek(0) cfg_file.writelines([f'home = {python_home}\n' if line.startswith('home') else line for line in lines])

print("Updated pyvenv.cfg with Python installation path:", python_home)

furkanshaikh313 commented 1 year ago

it did thx @motormonster but its now asking to install charecter_ai lol I'm new to programing and dont have a clue please help @motormonster

furkanshaikh313 commented 1 year ago

It bascially stops here Welcome back, to speak press RIGHT_SHIFT, RIGHT_CTRL at the same time. Connecting to VTube Studio! You (mic) >Authentication request sent to VTube Studio, please click allow. voicevox: 2023-06-03T07:52:04.413110Z INFO voicevox_core::publish: 検出されたGPU (DirectMLには1番目のGPUが使われます): voicevox: 2023-06-03T07:52:04.421600Z INFO voicevox_core::publish: - "Intel(R) UHD Graphics 620" (128 MiB) voicevox: 2023-06-03T07:52:04.421639Z INFO voicevox_core::publish: - "Microsoft Basic Render Driver" (0 B) VTube Studio connected! at port 8001 voicevox: Warning: cpu_num_threads is set to 0. ( The library leaves the decision to the synthesis runtime ) voicevox: INFO: Started server process [12384] voicevox: INFO: Waiting for application startup. voicevox: reading C:\Users\HP\AppData\Local\voicevox-engine\voicevox-engine\tmpxhca1bqu ... 62 emitting double-array: 100% |###########################################| | voicevox: INFO: Application startup complete. voicevox: INFO: Uvicorn running on http://127.0.0.1:50021 (Press CTRL+C to quit) voicevox: INFO: 127.0.0.1:53862 - "GET / HTTP/1.1" 404 Not Found

furkanshaikh313 commented 1 year ago

and im getting this too [node_characterai] Puppeteer - This is an experimental feature. Please report any issues on github. c:\Users\HP\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\desktop-waifu-master\node_modules\puppeteer-core\lib\cjs\puppeteer\node\ProductLauncher.js:289 throw new Error(Could not find Chromium (rev. ${this.puppeteer.browserRevision}). This can occur if either\n + ^

Error: Could not find Chromium (rev. 1108766). This can occur if either

  1. you did not perform an installation before running the script (e.g. npm install) or
  2. your cache path is incorrectly configured (which is: C:\Users\HP.cache\puppeteer). For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration. at ChromeLauncher.resolveExecutablePath (c:\Users\HP\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\desktop-waifu-mles\puppeteer-extra\dist\index.cjs.js:128:41) at async Requester.initialize (c:\Users\HP\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\desktop-waifu-master\character_ai\requester.js:25:25) at async Client.authenticateAsGuest (c:\Users\HP\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\desktop-waifu-master\character_ai\client.js:197:9) at async main (c:\Users\HP\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\desktop-waifu-master\character_ai\runner.js:51:5)
motormonster commented 1 year ago

hmmm sometimes chromium doesnt install right for whatever reason, id say google chromium and get it installed. i had to shoot in the dark on that issue too, not sure what causes it to mess up.

motormonster commented 1 year ago

it did thx @motormonster but its now asking to install charecter_ai lol I'm new to programing and dont have a clue please help @motormonster

hmmmm ill see if I can find anything on that. I'm pretty new too so most of this is just googling and praying lmao.

furkanshaikh313 commented 1 year ago

on what patch should i put chromium its really confusing me man like i dowloaded it but dont know where to keep it @motormonster help

furkanshaikh313 commented 1 year ago

I finally got it to work @motormonster can we team up for a project which i have in my mind if yes message me on my discord ClipHamper#8266

theStyleWithin commented 1 year ago

I'm lost I can't get this to work either what version of npm am I supposed to install? I find node easily. But npm that's a whole other level of confusion for me.

motormonster commented 1 year ago

The latest version of npm should be fine @theStyleWithin

theStyleWithin commented 1 year ago

Link to the right one please?