Run python script from user interface

i wrote a simlpe python script and run succefully seperately - i added python minimal environment -, i want to execute it on click button, but it’s not working when i do:
python3 script.py i got python isn’t not known and even if i use python3
so no im calling ps1 script that invoke python execution like the following


the 1st method is same as what the ps1 do but directly in the interface page.
is there a direct way so i don’t use powershell in between?