Those are both good and sensible places for a person to look, Torpedo & Cristi_Neagu... I was thinking maybe the Python interpreter was changed for Win11. It does look like it should function as intended though... All I can see on the Python dot org site is the statement "Note that Python 3.9.15 cannot be used on Windows 7 or earlier", up through the same message for the current 'stable' 3.11 release. But the NetFramework could be it also. In Windows 10 & 11, you can enable it by using the MS Documentation
Install the .NET Framework 3.5 on Windows... site's instructions, if you need help with that. Let us know how it goes after that please... it will be at least a week before my new laptop arrives that I can try it on...