[docs] Environment Variable Documentation Clarification Needed

Zachary Ware zachary.ware+pydocs at gmail.com
Wed Jan 15 05:04:50 CET 2014


Hi Jeff,

On Sat, Dec 28, 2013 at 2:20 AM, Jeff Bradley <jbradley5000 at gmail.com> wrote:
> On this page: http://docs.python.org/2/using/windows.html#setting-envvars
>
> the instructions mention a pythonpath environment variable (which led me to
> believe I need to create that environment variable).  I wasn't able to get
> this to work.  What did work was adding the following to the end of the
> existing Path variable:
> ;C:\Python27\;C:\Python27\Scripts\

This issue is touched on in the following section:
http://docs.python.org/2/using/windows.html#finding-the-python-executable

PYTHONPATH is a variable used by Python itself, while adding
C:\Python27 to PATH is what makes Windows able to find python.exe when
you ask for it at the command line.

That whole page could stand a good update, though; I've just created
issue 20265 to do just that (http://bugs.python.org/issue20265)

> Once I closed and reopened command prompt, windows recognized the python
> command.

That's the usual with Windows.  You can temporarily make Python
findable with `set PATH=%PATH%;C:\Python27`, but it won't last past a
command prompt restart until you find and fiddle with the Environment
Variables config dialog.

> The path variable is mentioned here: http://docs.python.org/2/faq/windows,
> however I would suggest editing the faq page to say, "Add the following to
> the end of the PATH environment variable:
> ;C:\Python27\;C:\Python27\Scripts\".

That page could also use some care, hence issue 20266
(http://bugs.python.org/issue20266).

Thanks for bringing those pages to attention!

--
Zach


More information about the docs mailing list