New issue, every time I restart my computer the script creates the same issue as before. In order to solve the issue, I have to move the PYTHON37.dll file back into windows\system32 folder and once again set
set PATH=C:\edb\languagepack\v1\Python-3.7; C:\edb\languagepack\v1\Perl-5.26\bin; C:\edb\languagepack\v1\Tcl-8.6\bin;%PATH%
and then reset the server with
pg_ctl.exe -D ../data restart.
In once again starts working.
I have a feeling the PYTHONHOME path is being lost but can't figure how to make it work every time.
In windows create an enviroment system variable called PYTHONHOME and set it to the location of where python is in the language folder.
Then the system path variable add new
Then add a new entry and add 3 entries
for a total of 4 entires.
Close all the windows and restart the computer. Open up the enviormental variables again and make sure they are there.