python installation
1. Installing Python on *E:*
If during setup you choose Customize Installation → Installation Location and set it to
E:\PythonXX
, the main interpreter, Lib, and Scripts will live there.Example:
E:\Python311\python.exe
E:\Python311\Scripts\pip.exe
2. What about pylauncher (py.exe
)?
By default, the installer puts
py.exe
inC:\Windows\
(and sometimesC:\Windows\System32\
).Reason:
py.exe
is meant to be a global launcher for all Python versions, so Windows can find it without messing with PATH.So yes, even if Python itself is on E:, the
py.exe
will still land in C:\ unless you uncheck the “Install py launcher” option.
3. PATH implications
If you check “Add Python to PATH”, it will add something like:
E:\Python311\
E:\Python311\Scripts\
That’s clean, stays on E:.
The only C:\ “pollution” is
py.exe
.
4. Can you avoid py.exe
on C:?
Yes: uncheck “Install py launcher” during install.
Downside: you lose the ability to run Python with just
py
(likepy -3.11 script.py
). You’d instead callpython.exe
directly from E:.
Comments
Post a Comment