Building very simple WebGL on Windows fails with python errors

When I build this simple 2D unity program ( my first ) on Windows for Windows or for Android, it works.

However when i build ( on Windows ) for WebGL i get 9 of these errors , only differing by the .o file

Building Library\Bee\artifacts\WebGL\il2cpp\release_WebGL_wasm\gdm2imgkbx5v.o failed with output:
Fatal Python error: init_sys_streams: can't initialize sys standard streams
Traceback (most recent call last):
  File "C:\Users\myname\AppData\Local\Programs\Python\Python311\Lib\io.py", line 52, in <module>
  File "C:\Users\myname\AppData\Local\Programs\Python\Python311\Lib\abc.py", line 105
    def __new__(mcls, name, bases, namespace, /, **kwargs):
                                              ^
SyntaxError: invalid syntax

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I didn’t even know this thing used python. What have i tried: different versions of the editor, same errors. I also compiled on a linux vm where it worked but i cant attach the sound files to my audio sources on linux editor.

Can anybody help, sorry if this is not the place for this question. Thanks in advance.

Hi there.

So we tested building a simple 2D project with WebGL in 2023.3.0a1 and it was successful. From the error it does seem like something to do with not having Python in your path. Could you try installing Python for Windows installer and ensure you select the “Add Python.exe to Path” checkbox during the installation process to see if that resolves the issue?

yes that worked. notice that i also had to check the other checkbox in the python installer ( launch py.exe as admin or something ) for that i had to uninstall a previous python version ( or it would remain unselectable ). But now its working, thanks alot