Saturday, 11 December 2010

Set Python Environment Variable - Windows 7

Unlike when you install ruby, when you install python on windows 7 the environment variable is not set. This means that you will have to put the full path of your python installation in to the command line to execute any commands.

To set the path of your python installation in an environment variable follow these steps:

click the start buttong

right click computer and select properties

click "advanced system settings" on the left

the system properties windows should open

make sure the "advanced" tab is selected

click the environment variables button at the bottom of the tab

you will see a window open split in to 2 windows "user and system variables"

click new on the top one (user variables)

click new and enter "Path" as the variable name

"C:\Python26;C:\Python26\DLLs;C:\Python26\Lib;C:\Python26\Lib\lib-tk" (without the quotes) for variable value

switch the path to wherever your python installation is. done, reopen the command prompt and when you type python you should see details of the installed version.

enjoy

No comments:

Post a Comment