Bug report
Bug description
I encountered what appears to be an inconsistency in the interaction between the Windows Python installation, the Python Launcher (py), and package installation with pip on Python 3.14.x.
Initially, I observed that packages installed with pip could not be imported and consistently resulted in:
ModuleNotFoundError
At first, I suspected that the user site-packages directory was not being included in the interpreter’s module search path. However, after further investigation, I found that this assumption was incorrect.
Running:
python -m site
shows that ENABLE_USER_SITE is True and that the user site-packages directory is present in sys.path.
I then discovered that my system had both the standard interpreter (python.exe) and the free-threaded interpreter (python3.14t.exe) installed. The python command and the py launcher were invoking different interpreters, each using a separate user site-packages directory (Python314 and Python314t, respectively).
This appears to explain why packages installed with one interpreter were unavailable when code was executed with the other interpreter.
Expected behavior
If this behavior is expected, I would appreciate clarification in the documentation regarding how the Python Launcher selects between the standard and free-threaded interpreters, and how this affects package installation and module discovery.
If it is not expected, there may be an opportunity to improve the installer, launcher, or overall user experience to reduce confusion when both interpreter variants are installed.
Steps performed
To investigate the issue, I performed the following:
-
Tested with Python 3.14.4, 3.14.5, and 3.14.6.
-
Completely removed previous Python installations.
-
Deleted previously installed user packages.
-
Reinstalled Python using the official Windows installer.
-
Verified
PATHandPYTHONPATH. -
Installed packages using both:
pip install <package>python -m pip install <package>
-
Tested installations using the
--useroption. -
Compared the outputs of:
python -m sitepython -m pip --versionpy -m pip --versionwhere pythonwhere pippy -0p
Additional information
Based on my investigation, I am no longer certain that this is a CPython bug. It may instead be related to the installer, the Python Launcher (py), or the interaction between the standard and free-threaded interpreter variants on Windows.
If additional diagnostic information is helpful, I would be happy to provide it.
CPython versions tested on
- 3.14.4
- 3.14.5
- 3.14.6
Operating systems tested on
- Windows 11 Pro