🐛 fix(seed): add --ignore-installed to pip invoke seeder#3064
Merged
Conversation
On macOS with the system Python from Xcode CommandLineTools, the venv's sys.path can leak system site-packages. When pip sees existing packages there (pip, setuptools, wheel), it tries to uninstall them before installing the new versions, failing with PermissionError since those paths are root-owned. Adding --ignore-installed tells pip to skip checking for existing installations entirely, which is safe since we're seeding a fresh venv. Fixes pypa#2121
This was referenced Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On macOS with the system Python from Xcode CommandLineTools, the
PipInvokeseeder fails withPermissionError: [Errno 13] Permission denied: 'RECORD'when creating virtual environments. 🐛 This happens because the venv'ssys.pathleaks the systemsite-packages, causing pip to attempt uninstalling root-owned packages (pip, setuptools, wheel) before installing the seeded versions.The fix adds
--ignore-installedto the pip install command used during seeding. Since we're always installing into a freshly created virtual environment, there's no reason for pip to inspect or remove pre-existing packages visible through the inheritedsys.path. This flag is already commonly used in similar contexts (e.g.,pip install --ignore-installedinside Docker builds and CI environments) and carries no downside here.This affects macOS users on both x86 and ARM/M1 when using the system Python, and has been reported by multiple users including JetBrains IDE users who rely on the zipapp. Linux and user-installed Python interpreters are unaffected.
Fixes #2121