You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple Python versions are installed in the same image #253
This is kind of an unfortunate side-effect of our use of buildpack-deps in the non-slim variants -- some of the packages that it includes require Python, and there's not a lot we can do to fix that (it's the nature of including the whole kitchen sink).
We have made sure that PATH is set appropriately such that the Python installed by this image is preferred.
$ docker pull python:33: Pulling from library/pythonf49cf87b52c1: Already exists 7b491c575b06: Already exists b313b08bab3b: Already exists 51d6678c3f0e: Already exists 09f35bd58db2: Already exists 0f9de702e222: Pull complete 73911d37fcde: Pull complete 99a87e214c92: Pull complete Digest: sha256:b7411c363d4206930dd47a9bf668157bd99ba4ea3e5174ec4c25776c5b1abe9aStatus: Downloaded newer image for python:3
$ docker run -it --rm python:3 bashroot@86816c8e6aa6:/# apt purge python.*Reading package lists... DoneBuilding dependency tree Reading state information... DoneNote, selecting 'python-minimal:any' for regex 'python.*'Note, selecting 'python-support' for regex 'python.*'Note, selecting 'python-all-dbg' for regex 'python.*'Note, selecting 'libpython2.7-stdlib' for regex 'python.*'Note, selecting 'python2.7-elementtree' for regex 'python.*'Note, selecting 'python-argparse' for regex 'python.*'Note, selecting 'python-minimal' for regex 'python.*'Note, selecting 'python-ctypes' for regex 'python.*'Note, selecting 'python-central' for regex 'python.*'Note, selecting 'python-all-dev' for regex 'python.*'Note, selecting 'python-wsgiref' for regex 'python.*'Note, selecting 'python2.7-celementtree' for regex 'python.*'Note, selecting 'python-bzrlib-dbg' for regex 'python.*'Note, selecting 'python-urllib3' for regex 'python.*'Note, selecting 'python-all' for regex 'python.*'Note, selecting 'python-apt' for regex 'python.*'Note, selecting 'python2.6-minimal' for regex 'python.*'Note, selecting 'python2.7-minimal:any' for regex 'python.*'Note, selecting 'python2.7-cjkcodecs' for regex 'python.*'Note, selecting 'python-gobject' for regex 'python.*'Note, selecting 'python2.7' for regex 'python.*'Note, selecting 'python-virtualenv' for regex 'python.*'Note, selecting 'python-dbg' for regex 'python.*'Note, selecting 'python2.7-profiler' for regex 'python.*'Note, selecting 'python-gi' for regex 'python.*'Note, selecting 'python-dev' for regex 'python.*'Note, selecting 'python-4suite' for regex 'python.*'Note, selecting 'python-examples' for regex 'python.*'Note, selecting 'python-pycurl' for regex 'python.*'Note, selecting 'python-configobj-doc' for regex 'python.*'Note, selecting 'python2.7-bzrlib' for regex 'python.*'Note, selecting 'python-six' for regex 'python.*'Note, selecting 'python-profiler' for regex 'python.*'Note, selecting 'python' for regex 'python.*'Note, selecting 'python-doc' for regex 'python.*'Note, selecting 'python-openssl' for regex 'python.*'Note, selecting 'python-pygments' for regex 'python.*'Note, selecting 'python-gpgme' for regex 'python.*'Note, selecting 'python-mysqldb' for regex 'python.*'Note, selecting 'libpython-stdlib' for regex 'python.*'Note, selecting 'python:any' for regex 'python.*'Note, selecting 'python-tk' for regex 'python.*'Note, selecting 'python-kerberos' for regex 'python.*'Note, selecting 'python2.7-minimal' for regex 'python.*'Note, selecting 'python2.7-ctypes' for regex 'python.*'Note, selecting 'python-importlib' for regex 'python.*'Note, selecting 'python2.7-wsgiref' for regex 'python.*'Note, selecting 'python-configobj' for regex 'python.*'Note, selecting 'python-bzrlib.tests' for regex 'python.*'Note, selecting 'python-email' for regex 'python.*'Note, selecting 'python2.5-minimal' for regex 'python.*'Note, selecting 'python-bzrlib' for regex 'python.*'Note, selecting 'python2.7-doc' for regex 'python.*'Note, selecting 'python-paramiko' for regex 'python.*'Note, selecting 'python2.7-argparse' for regex 'python.*'Note, selecting 'python-launchpadlib' for regex 'python.*'Note, selecting 'libpython2.7-minimal' for regex 'python.*'Note, selecting 'python3.1-minimal' for regex 'python.*'Note, selecting 'python2.7:any' for regex 'python.*'Package 'python-configobj-doc' is not installed, so not removedPackage 'python-bzrlib-dbg' is not installed, so not removedPackage 'python-bzrlib.tests' is not installed, so not removedPackage 'python-gpgme' is not installed, so not removedPackage 'python-kerberos' is not installed, so not removedPackage 'python-paramiko' is not installed, so not removedPackage 'python-pycurl' is not installed, so not removedPackage 'python-launchpadlib' is not installed, so not removedNote, selecting 'python-bzrlib' instead of 'python2.7-bzrlib'Package 'python-gi' is not installed, so not removedPackage 'python2.7-doc' is not installed, so not removedNote, selecting 'python' instead of 'python-profiler'Package 'python-virtualenv' is not installed, so not removedNote, selecting 'python2.7' instead of 'python2.7:any'Note, selecting 'python' instead of 'python:any'Package 'python-central' is not installed, so not removedPackage 'python-all' is not installed, so not removedPackage 'python-all-dbg' is not installed, so not removedPackage 'python-all-dev' is not installed, so not removedPackage 'python-dbg' is not installed, so not removedPackage 'python-dev' is not installed, so not removedPackage 'python-examples' is not installed, so not removedPackage 'python-support' is not installed, so not removedPackage 'python2.5-minimal' is not installed, so not removedPackage 'python2.6-minimal' is not installed, so not removedPackage 'python3.1-minimal' is not installed, so not removedNote, selecting 'python-minimal' instead of 'python-minimal:any'Package 'python-mysqldb' is not installed, so not removedPackage 'python-pygments' is not installed, so not removedPackage 'python-openssl' is not installed, so not removedPackage 'python-gobject' is not installed, so not removedPackage 'python-apt' is not installed, so not removedPackage 'python-4suite' is not installed, so not removedPackage 'python-urllib3' is not installed, so not removedNote, selecting 'libpython2.7-stdlib' instead of 'python-argparse'Note, selecting 'libpython2.7-stdlib' instead of 'python2.7-argparse'Note, selecting 'libpython2.7-stdlib' instead of 'python2.7-celementtree'Note, selecting 'libpython2.7-stdlib' instead of 'python2.7-cjkcodecs'Note, selecting 'libpython2.7-stdlib' instead of 'python2.7-ctypes'Note, selecting 'libpython2.7-stdlib' instead of 'python2.7-elementtree'Note, selecting 'libpython2.7-stdlib' instead of 'python2.7-profiler'Note, selecting 'libpython2.7-stdlib' instead of 'python2.7-wsgiref'Package 'python-doc' is not installed, so not removedPackage 'python-tk' is not installed, so not removedNote, selecting 'python' instead of 'python-ctypes'Note, selecting 'python' instead of 'python-email'Note, selecting 'python' instead of 'python-importlib'Note, selecting 'python' instead of 'python-wsgiref'Note, selecting 'python2.7-minimal' instead of 'python2.7-minimal:any'The following packages were automatically installed and are no longer required: gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-glib-2.0 gir1.2-rsvg-2.0 libcairo-gobject2 libcairo-script-interpreter2 libcdt5 libcgraph6 libdjvulibre-dev libelfg0 libexif-dev libexif12 libexpat1-dev libfontconfig1-dev libfreetype6-dev libgd3 libgirepository-1.0-1 libglib2.0-bin libgraphviz-dev libgvc6 libgvpr2 libice-dev libice6 libilmbase-dev libjasper-dev libjbig-dev libjs-excanvas libjs-jquery liblcms2-dev liblqr-1-0-dev liblzo2-2 libmagickcore-6-arch-config libmagickcore-6-headers libmagickwand-6-headers libopenexr-dev libpathplan4 libpcre3-dev libpcrecpp0 libpixman-1-dev libpthread-stubs0-dev libsm-dev libsm6 libtiff5-dev libtiffxx5 libvpx1 libwmf-dev libx11-dev libxau-dev libxcb-render0-dev libxcb-shm0-dev libxcb1-dev libxdmcp-dev libxdot4 libxext-dev libxpm4 libxrender-dev libxt-dev libxt6 mime-support pkg-config x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-render-dev x11proto-xext-dev xorg-sgml-doctools xtrans-devUse 'apt-get autoremove' to remove them.The following packages will be REMOVED: bzr* libcairo2-dev* libgdk-pixbuf2.0-dev* libglib2.0-dev* libmagickcore-6.q16-dev* libmagickcore-dev* libmagickwand-6.q16-dev* libmagickwand-dev* libpython-stdlib* libpython2.7-minimal* libpython2.7-stdlib* librsvg2-dev* mercurial* mercurial-common* python* python-bzrlib* python-configobj* python-minimal* python-six* python2.7* python2.7-minimal*0 upgraded, 0 newly installed, 21 to remove and 0 not upgraded.After this operation, 56.8 MB disk space will be freed.Do you want to continue? [Y/n]
Activity
tianon commentedon Jan 2, 2018
This is kind of an unfortunate side-effect of our use of
buildpack-depsin the non-slim variants -- some of the packages that it includes require Python, and there's not a lot we can do to fix that (it's the nature of including the whole kitchen sink).We have made sure that
PATHis set appropriately such that the Python installed by this image is preferred.