docker-library / docker-library/python
Package name uppercase problem with windows image
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 2.8k
- Forks
- 1.1k
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 1
Description
Overview
I found a strange pip problem on windows based image related to python packages that are installed with capital letters in their folder name.
The problem is happening when uninstalling a package with uppercase letters in its name, eg: PyPDF2.
I confirm Linux images don't have this problem.
How to reproduce
Here are minimal reproducible steps:
docker pull python:3.13.3-windowsservercore-ltsc2022
docker run --rm -it python:3.13.3-windowsservercore-ltsc2022 powershell
# First install
pip install PyPDF2
python -c "import PyPDF2 as p; print(p.__file__)"
# Prints:
C:\Python\Lib\site-packages\PyPDF2\__init__.py
pip uninstall -y PyPDF2
# 2nd install
pip install PyPDF2
python -c "import PyPDF2 as p; print(p.__file__)"
# Prints:
Traceback (most recent call last):
File "<string>", line 1, in <module>
import PyPDF2 as p; print(p.__file__)
^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'PyPDF2'
# Let's try lowercase:
python -c "import pypdf2 as p; print(p.__file__)"
# Prints:
C:\Python\Lib\site-packages\pypdf2\__init__.py
# Even if:
pip freeze
# Prints:
PyPDF2==3.0.1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported sequence in the python:3.13.3-windowsservercore-ltsc2022 image: install PyPDF2, uninstall it, reinstall it, and compare the import paths. Inspect the Windows image behavior around pip uninstall and site-packages; done means a package with uppercase letters can be uninstalled and reinstalled while remaining importable under its expected name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100