There are a number of things to remember when you deal with the
Path environment variable in Windows.
The items in the
Pathstring are seperated by semicolon:
;, there should be no space around the semicolon. “C:\SomePath ; C:\AnotherPath” is NOT OK.
It is better to use
\instead of any
/in the string.
No final backslash as in:
Whenever you make a change to
Pathvariable, be sure to close and reopen any Cmd or Shell window.
You can add a new environment variable as “myexedir” and add that variable as ;%myexedir% to the Path string.
Open cmd.exe with administrator privileges and type:
setx path “%path%;C:\Python27” /m
/m makes the changes at the
system environment, if you omit it then the changes are made in the
Nonexisting paths in
Pathcan cause problems.
Path Manager is a little utlity that helps with the
You can prepare a bat file:
@echo off PATH C:\Python27;%path% title Octopress – %Username%@%Computername% cd C:\Projects\WebProjects\octopress cmd
Which will add the directory you want to be added to the Path. This will be valid for the command session only, and as a bonus can land you right into the directory that you want to work. This solution is the one that I feel more comfortable with.
For a discussion about these recommendations on Stackoverflow see: http://stackoverflow.com/questions/6318156/adding-python-path-on-windows-7