You are on page 1of 1

PEP 397

On Windows, since PEP 397, py.exe, the launcher, installs in the system area, meaning it is sure—
barring further manipulation on your part—to be on the PATH.

On Windows, press the Windows key and start typing python: “Python
3.x (command-line)” appears, along with other choices, such as “IDLE
(Python GUI).” If you have the py.exe launcher installed (which is the
normal case), at any command prompt, typing py launches Python.

Environment Variables
Besides PATH, other environment variables affect the python program.
Some environment variables have the same effects as options passed to
python on the command line, as we show in the next section. Several
environment variables provide settings not available via command-line
options. The following list covers just the basics of a few frequently used
ones; for all details, see the online docs.
PYTHONHOME
The Python installation directory. A lib subdirectory, containing the
standard Python library, must exist under this directory. On Unix-like
systems, the standard library modules should be in lib/python-3.x for
Python 3.x, where x is the minor Python version. If not set, Python uses
some heuristics to locate the installation directory.

PYTHONPATH
A list of directories, separated by colons on Unix-like systems, and by
semicolons on Windows. Python can import modules from these
directories. This list extends the initial value for Python’s sys.path
variable. We cover modules, importing, and sys.path in Chapter
“Modules.”

You might also like