Skip to content

README: explain the externally-managed-environment error - #74

Merged
leerho merged 1 commit into
mainfrom
readme-pep668
Oct 11, 2026
Merged

leerho merged 1 commit into
mainfrom
readme-pep668

Conversation

@leerho

@leerho leerho commented Oct 10, 2026

Copy link
Copy Markdown
Member

Fixes #46.

Homebrew Python, and the system Python on Debian 12+ and Ubuntu 23.04+, are marked "externally managed" (PEP 668), so python3 -m pip install . or python3 -m pip install datasketches fails there with error: externally-managed-environment. That is more common now than when #46 was filed.

This adds a short note under Building and Installation: what the error means, and the three commands to install into a virtual environment instead.

It is worded as a conditional ("If either command fails with ...") rather than a required step, following the discussion on #46: a virtual environment is not the right default everywhere (for example, in Docker images), so the general instructions are unchanged.

🤖 Generated with Claude Code

Homebrew Python and recent Debian and Ubuntu system Pythons refuse
pip installs into the base environment (PEP 668). Say what the error
means and how to install into a virtual environment instead, without
making a virtual environment part of the general instructions.

Fixes #46.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@leerho
leerho requested review from proost and tisonkun October 10, 2026 21:56
@leerho
leerho merged commit f581d79 into main Oct 11, 2026
6 checks passed
@leerho
leerho deleted the readme-pep668 branch October 11, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Homebrew installations of python throw an error on building

2 participants