docker-library / python

Docker Official Image packaging for Python

Home Page:https://www.python.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two different python 3.11 binaries in python:3.11

piotr-piatkowski opened this issue · comments

Not only there're two python3 binaries in the image, but they have different paths - so when I add libraries with one of them, the other will not see them. Is there any point for having two binaries?

$ docker run -ti --rm python:3.11 bash
root@698d29473fa1:/# /bin/python3 -c 'import sys; print(sys.path)'
['', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/usr/local/lib/python3.11/dist-packages', '/usr/lib/python3/dist-packages']
root@698d29473fa1:/# /usr/local/bin/python3 -c 'import sys; print(sys.path)'
['', '/usr/local/lib/python311.zip', '/usr/local/lib/python3.11', '/usr/local/lib/python3.11/lib-dynload', '/usr/local/lib/python3.11/site-packages']

Good find! This is caused by the image using buildpack-dev as a base for debian variants.