-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
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
Metadata
Metadata
Assignees
Labels
No labels