I had a Dockerfile that pulled the Swift image and installed Python on top of it using
apt. The Dockerfile no longer works with the 5.0 image.
# apt-get install python-pip [...] Preparing to unpack .../python2.7-minimal_2.7.15~rc1-1ubuntu0.1_amd64.deb ... new installation of python2.7-minimal; /usr/lib/python2.7/site-packages is a directory which is expected a symlink to /usr/local/lib/python2.7/dist-packages. please find the package shipping files in /usr/lib/python2.7/site-packages and file a bug report to ship these in /usr/lib/python2.7/dist-packages instead aborting installation of python2.7-minimal dpkg: error processing archive /var/cache/apt/archives/python2.7-minimal_2.7.15~rc1-1ubuntu0.1_amd64.deb (--unpack): new python2.7-minimal package pre-installation script subprocess returned error exit status 1
Checking the site-packages directory, it appears to exist to support LLDB:
# ls -l /usr/lib/python2.7/site-packages total 88 drwxr-xr-x 5 root root 4096 Apr 19 02:31 lldb -rw-r--r-- 1 root root 8472 Apr 19 01:36 readline.so -rw-r--r-- 1 root root 30130 Apr 19 02:31 six.py -rw-r--r-- 1 root root 38747 Apr 19 01:58 six.pyc
I was able to fix this (ostensibly) by running
mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/dist-packages; ln -s dist-packages /usr/lib/python2.7/site-packages before running my
apt commands. I was wondering if this is the right thing to do, and if this could be fixed at the source.