Skip to content

🐛 fix(seed): add --ignore-installed to pip invoke seeder#3064

Merged
gaborbernat merged 1 commit into
pypa:mainfrom
gaborbernat:extra
Feb 23, 2026
Merged

🐛 fix(seed): add --ignore-installed to pip invoke seeder#3064
gaborbernat merged 1 commit into
pypa:mainfrom
gaborbernat:extra

Conversation

@gaborbernat

Copy link
Copy Markdown
Contributor

On macOS with the system Python from Xcode CommandLineTools, the PipInvoke seeder fails with PermissionError: [Errno 13] Permission denied: 'RECORD' when creating virtual environments. 🐛 This happens because the venv's sys.path leaks the system site-packages, causing pip to attempt uninstalling root-owned packages (pip, setuptools, wheel) before installing the seeded versions.

The fix adds --ignore-installed to 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 inherited sys.path. This flag is already commonly used in similar contexts (e.g., pip install --ignore-installed inside 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

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
@gaborbernat gaborbernat enabled auto-merge (squash) February 23, 2026 12:51
@gaborbernat gaborbernat merged commit a852cbb into pypa:main Feb 23, 2026
203 of 206 checks passed
@gaborbernat gaborbernat deleted the extra branch February 25, 2026 17:35
This was referenced Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling zipapp virtualenv with --seeder=pip fails with OSError: [Errno 13] Permission denied: 'RECORD'

1 participant