Repository navigation
README: explain the externally-managed-environment error - #74
Merged
Merged
Conversation
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 <noreply@anthropic.com>
tisonkun
approved these changes
Oct 11, 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.
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 .orpython3 -m pip install datasketchesfails there witherror: 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