how to set environment variables for using python

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • learnerofpython
    New Member
    • Nov 2006
    • 14

    how to set environment variables for using python

    I am unable to run any python program from command prompt(unless i run it from the python directory)
    e.g i hav python stored as C:\python25
    I cannot run python programs from elsewhere as python command is not recognizable elsewhere.
    what do i need to do??can anyone guide me?
  • fuffens
    New Member
    • Oct 2006
    • 38

    #2
    On a Windows system you just add the folder of the Python executable to your Path environment variable.

    1. Go to Control Desk
    2. Select System
    3. In System Properties, select Advanced tab
    4. Select Environment Variables
    5. Edit your Path variable. Add C:\python25 to the list of paths.

    You might have to restart your computer in order for it to work.
    Best Regards
    /Fredrik

    Comment

    • bartonc
      Recognized Expert Expert
      • Sep 2006
      • 6478

      #3
      Originally posted by fuffens
      On a Windows system you just add the folder of the Python executable to your Path environment variable.

      1. Go to Control Desk
      2. Select System
      3. In System Properties, select Advanced tab
      4. Select Environment Variables
      5. Edit your Path variable. Add C:\python25 to the list of paths.

      You might have to restart your computer in order for it to work.
      Best Regards
      /Fredrik
      Fredrik, what's Control Desk (it definitely sounds like something I should know about)?

      learnerofpython , if you have the same question, right click My Computer go to Advanced tab of System Properties click Environment Variables. Path names can be copied from and explorer window. They are separated by semicolon in the PATH variable (which should be the top one). Hope this helps,
      Barton

      Comment

      • bartonc
        Recognized Expert Expert
        • Sep 2006
        • 6478

        #4
        Originally posted by bartonc
        Fredrik, what's Control Desk (it definitely sounds like something I should know about)?

        learnerofpython , if you have the same question, right click My Computer go to Advanced tab of System Properties click Environment Variables. Path names can be copied from and explorer window. They are separated by semicolon in the PATH variable (which should be the top one). Hope this helps,
        Barton
        Oh, I see... Control Panel: System icon.

        Comment

        Working...