I am trying to install PyICU in to a Balena container. The container I am using is:
The container already has Python installed in to /usr/local/bin/python3:
# which python3 /usr/local/bin/python3
I then run the install command for PyICU:
Which gives the following output:
Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libexpat1 libicu63 libmpdec2 libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib mime-support python3 python3-minimal python3.7 python3.7-minimal Suggested packages: python3-doc python3-tk python3-venv python3.7-venv python3.7-doc binutils binfmt-support Recommended packages: bzip2 file xz-utils The following NEW packages will be installed: libexpat1 libicu63 libmpdec2 libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib mime-support python3 python3-icu python3-minimal python3.7 python3.7-minimal 0 upgraded, 12 newly installed, 0 to remove and 27 not upgraded. Need to get 12.7 MB of archives.
Because Balena images have Python installed in /usr/local/bin/ rather than /usr/bin, it is fetching Python again and installing it again through the package manager. Of course I would like to try and avoid this as it is adding extra size to my images. Any ideas how? Ideally without having to build PyICU or other packages from source.