01/10/2018, 09:44

Lỗi "The term 'python' is not recognized..." là lỗi gì?

The term ‘python’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the sp
ling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:7

  • python <<<< .ex1.py
    • CategoryInfo : ObjectNotFound: (python:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException
Nguyễn Duy Hùng viết 11:59 ngày 01/10/2018

cài đặt lại biến môi trường nha bạn. Bạn phải chắc là đã cài Python
bận powershell lên gõ dòng này vào
[ENVIRONMENT]::SETENVIRONMENTVARIABLE("PATH", "$ENV:PATH;C:\PYTHON27", "USER")
tắt đi rồi bật lại powershell

viết 11:47 ngày 01/10/2018

bạn chạy python từ CLI mà chưa python thì chưa global. Cái này comment trên đã giải thích rồi.
Mình comment để khuyên bạn nên dùng 1 IDE để code (IDE là gì? IDE nào tốt? những cái đó có trên gg), k nên dùng command line.

Bài liên quan
0