Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Saturday, March 4, 2023

Python command not working in command prompt

In Windows 7 python start command in command prompt is
c:\>python3
but in Windows 10 python start command in command prompt is

  C:\>py
  Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 
  32 bit (Intel)] on win32 Type "help", "copyright", "credits" or 
  "license" for more information.
  >>> C:\>py --version Python 3.6.3
  C:\>
But in Windows 10 python3 syntax not work also not given any error. 
Django start command also uses py instead of python3.

But in Windows 11 after the installation path is not added, 
sometimes we need to add using Environment Variable in the 
User variable section.


 d:\>py manage.py runserver 
Check others answer and this answer in the stackoverflow on this link Python command not working in command prompt