Я использую версию Python 3.11. 4
ОС: Win11
Скрипт, который я пытаюсь запустить:
Код: Выделить всё
python3 -c "print(1)"
В PowerShell:
Код: Выделить всё
./test.ps1
Код: Выделить всё
./test.sh
Код: Выделить всё
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
Код: Выделить всё
py test.ps1
Код: Выделить всё
py test.sh
Код: Выделить всё
File "D:\python\testing\test.ps1", line 1
python3 -c "print(1)"
^^^^^^^^^^
SyntaxError: invalid syntax
Подробнее здесь: https://stackoverflow.com/questions/784 ... ith-python