Windows – How to set up the python environment variable on Windows 7

environment-variablespythonwindows 7

I would sure like to be able to type "python" on my command line instead of C:\Python27\python.exe. So to that end I'm trying to get the environment variable set up for myself.

Problem is, I can't seem to get the Python system environment variable to set up on my Windows 7 install. So far I have (as variable PYTHONPATH):


Not sure why that won't work. I've tried with a trailing semicolon and without, with backslashes at the end of the folders, and everything. What am I doing wrong?

Best Answer

You need to set the Python directory as your PATH, not PYTHONPATH. The latter is a separate variable that Python uses. Also, you only need the main directory (C:\Python27).