In order to execute our python program from cmd or terminal python path is set in our machine.
The path is stored in an environment variable, which is a named string maintained by the operating system. This variable contains information available to the command shell and other programs.

The path variable is named as PATH in Unix or Path in Windows (Unix is case sensitive; Windows is not).

  • Important step )

    To set python path first find the directory where we have installed our python software .
    In my case :

    Important step )
     #copy the path(in my case) 
  • Setting Temporary Python Path in windows

    Open CMD and type the following command.

     set path = python path (in my case)

    Setting Temporary Python Path in windows
    • Now test the temporary path , type few python commands

  • Setting Permanent Python Path in Windows

    Permanent path is set to environment variable in windows .
    In order to set permanent path first copy the path of python installation directory.
    then follow the steps.

    • Step-1 ) Right click on ThisPC

    • Step-2 ) Click on Advanced system settings
      Click on Environment Variables...

    • Step-3 ) Click on New...

    • Step-4 ) Enter the details
      Variable Name : path
      Varibale value : path of python installation directory.

    • Step-5 ) Now Open CMD and type python


What next?

The next topic is First Python Program

Share this page