pythonpython-3.xenvironment-variables

Python not recognized in laptop although it is installed


The python I have in my laptop did not compile any code. The error said enter image description here

I checked the environment variables (path) and the list is as follows

enter image description here

I also checked the installed program list

enter image description here

I did not understand why Python is not recognized in my system. Thank you for the help in advance.


Solution

  • You also need the following line in your path variable:

    C:\Users\cse_s\AppData\Local\Programs\Python\Python39\
    

    The usual ways to check if the install is correct is as follows:

    C:\Users\charl>python --version
    Python 3.12.3
    
    C:\Users\charl>python -V
    Python 3.12.3
    

    With Python Launcher installed:

    py -V