-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Newest 3.12 install on windows misses pip #117505
Comments
Can you zip up all the |
Issue 117505 logs.zip |
Well this is a very interesting case:
The exception It appears that Csound6_x64's installer overrides the global Probably we can just make |
I also need to take a closer look at why precompiling pyc files failed. There's not enough output here to see.
|
Actually, the heart of the matter is really in
@barneygale We're not supposed to ever raise exceptions through |
It indeed does : |
I do music production as well (mostly mixing) and also coding so I'm kinda interested to figure out what it does 😆 Looks like it could be fun But chances are you can delete the variable and the install should be fine after that. We can also make fixes upstream as well, though. |
also an interesting thing : the path to Csound ( around a year ago I moved most stuff from my primary drive to the secondary (links to |
This will be why Windows Installer was blocked from accessing it - this is a typical pattern used by attackers to intercept legitimate installers. Probably it works okay if the path is "normal". |
I just ran into this issue as well. I think there's a broader problem here. I've tested with 3.12 here, but the issue exists at least as far back as 3.8. Minimal steps to reproduce on a fresh Windows 11 installationPreparationThe goal here is to get pip installed in the Python 3.12 user site-packages without having Python 3.12 installed at the end of the process. These steps are a bit contrived because I couldn't figure out how to get into this state naturally, but I've seen it in the field.
Reproduction
AnalysisThe There may be a similar issue here: https://github.com/python/cpython/blob/v3.12.3/Mac/BuildScript/scripts/postflight.ensurepip#L13 |
Thanks @Vynce for the analysis. This is a very different root cause from the original report on this bug, but it's certainly viable. Given I don't think we can do anything specific about the original problem, as we don't control Windows Installer's security enforcement, I'm fine with reusing the issue number for (@pradyunsg FYI, or if you have another idea) |
) ensurepip forks a subprocess to run pip itself, but that subprocess only inherits a -I isolated mode flag (see _run_pip() in Lib/ensurepip/__init__.py), not the "-E -s" flags that the installer has been using. This means that parts of ensurepip don't actually run in an isolated environment and can make incorrect decisions based on packages installed in the user site-packages.
…ythonGH-118257) ensurepip forks a subprocess to run pip itself, but that subprocess only inherits a -I isolated mode flag (see _run_pip() in Lib/ensurepip/__init__.py), not the "-E -s" flags that the installer has been using. This means that parts of ensurepip don't actually run in an isolated environment and can make incorrect decisions based on packages installed in the user site-packages. (cherry picked from commit c9073eb) Co-authored-by: Michael Vincent <[email protected]>
…ythonGH-118257) ensurepip forks a subprocess to run pip itself, but that subprocess only inherits a -I isolated mode flag (see _run_pip() in Lib/ensurepip/__init__.py), not the "-E -s" flags that the installer has been using. This means that parts of ensurepip don't actually run in an isolated environment and can make incorrect decisions based on packages installed in the user site-packages. (cherry picked from commit c9073eb) Co-authored-by: Michael Vincent <[email protected]>
) ensurepip forks a subprocess to run pip itself, but that subprocess only inherits a -I isolated mode flag (see _run_pip() in Lib/ensurepip/__init__.py), not the "-E -s" flags that the installer has been using. This means that parts of ensurepip don't actually run in an isolated environment and can make incorrect decisions based on packages installed in the user site-packages. (cherry picked from commit c9073eb) Co-authored-by: Michael Vincent <[email protected]>
…ythonGH-118257) ensurepip forks a subprocess to run pip itself, but that subprocess only inherits a -I isolated mode flag (see _run_pip() in Lib/ensurepip/__init__.py), not the "-E -s" flags that the installer has been using. This means that parts of ensurepip don't actually run in an isolated environment and can make incorrect decisions based on packages installed in the user site-packages.
) ensurepip forks a subprocess to run pip itself, but that subprocess only inherits a -I isolated mode flag (see _run_pip() in Lib/ensurepip/__init__.py), not the "-E -s" flags that the installer has been using. This means that parts of ensurepip don't actually run in an isolated environment and can make incorrect decisions based on packages installed in the user site-packages. (cherry picked from commit c9073eb) Co-authored-by: Michael Vincent <[email protected]>
@zooba since all PRs that fixes this issue are merged, should we close this ? |
I left a question about whether |
Bug report
Bug description:
I recently did a fresh python installation, from python.org (https://www.python.org/ftp/python/3.12.2/python-3.12.2-amd64.exe)
I did installed it on an "uncommon" directory (
D:\EDM115\Programmes\Python312\
), but this had never caused any issue in the past.The main issue is that the
Scripts
folder was simply empty, meaning that no pip command worked. I verified that the pip checkbox was checked, tried to repair and later redo the install, only to face the same issues.What fixed it was to run
py -m ensurepip --upgrade
and later renameD:\EDM115\Programmes\Python312\Scripts\pip3.exe
toD:\EDM115\Programmes\Python312\Scripts\pip.exe
, but I believe that it should be done automaticallyCPython versions tested on:
3.12
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: