docker-library / docker-library/python

Package name uppercase problem with windows image

オープン
#1,049 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Dockerfile
スター
2.8k
フォーク
1.1k
平均マージ
3日 1時間
マージ済み PR(30日)
1

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、python:3.13.3-windowsservercore-ltsc2022 イメージで報告された手順を再現します。PyPDF2 をインストールし、アンインストールし、再インストールして、import パスを比較します。pip uninstall と site-packages 周辺の Windows イメージの挙動を調査します。大文字を含むパッケージをアンインストールして再インストールした後も、期待される名前で import 可能であれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, python
領域
infrastructure
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。