Stefan Manastirliu Log



Making python.exe available to any windows folder using command line

Well, if you have python installed on windows, probably you want to make it available, using command line, to any folder.

By default, on windows, python is available only on the installation folder, usualy something like:

C:\Python27

That’s frustrating, you have always to call python using absolute path, in this way

C:\mnstefan\python_files> C:\Python27\python.exe a-python-file.py

Orrible, no?

You want to do something like that instead:

C:\mnstefan\python_files> python a-python-file.py

Ok so:

Start menu -> right click on “Computer” -> Properties

Then, on the right side of the window you must see something like “Advanced system options”, click it.

Then click the “Environmet Variables” button.

Edit you “Path” record on “User variables…” if it exist, ore create a new onw, calling it “Path”

On the “Value” field put:

%PATH%;C:\Python27

You’re done.