docker-library / docker-library/python

pip._internal.models ModuleNotFoundError in Official Python Slim Docker Images

Open
#1,121 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
2.8k
Forks
1.1k
Avg merge
3d 1h
Merged PRs (30d)
1

Description

Official Python slim Docker images are shipping with a broken pip installation as of late May / June 2026. Any pip command fails immediately on a fresh pull with no modifications to the image.

Affected Images

  • python:3.10-slim-buster
  • python:3.11-slim

Reproduce

docker run --rm python:3.10-slim-buster pip install requests
docker run --rm python:3.11-slim pip install requests

No apt installs, no pip upgrades, no Dockerfile changes, fails on a clean pull.

Error

File "/usr/local/lib/python3.10/site-packages/pip/_internal/locations/__init__.py", line 9
    from pip._internal.models.scheme import SCHEME_KEYS, Scheme
ModuleNotFoundError: No module named 'pip._internal.models'

Impact

Silent breaking change. Builds working with zero Dockerfile modifications are
Now broken.

Environment

  • Docker: 26.x
  • Host OS: Linux
  • Date observed: June 1, 2026

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the listed docker run commands for python:3.10-slim-buster and python:3.11-slim, then inspect the official image packaging and pip installation for the reported missing module. Done means a fresh pull of each affected image can run pip install requests successfully without extra Dockerfile or apt changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.