New submission from Marco Ippolito <ippolito.ma...@gmail.com>:
Following the indications found here: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository I was trying to install Docker Engine in Ubuntu 18.04.02 Server Edition. The first installation's steps went fine but I encountered this error message: (base) marco@pc:~$ sudo add-apt-repository \ > "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ > $(lsb_release -cs) \ > stable" Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 11, in <module> from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler File "/usr/lib/python3/dist-packages/softwareproperties /SoftwareProperties.py", line 67, in <module> from gi.repository import Gio File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module> from . import _gi ImportError: cannot import name '_gi' from 'gi' (/usr/lib/python3/dist- packages/gi/__init__.py) But import gi in python3 works fine: (base) marco@pc:~$ python3 Python 3.7.3 (default, Mar 27 2019, 22:11:17) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import gi >>> After changing the first line of /usr/bin/add-apt-repository in order to point to 3.6 version : #!/usr/bin/python3.6 everything went fine: (base) marco@pc:~$ sudo add-apt-repository \ > "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ > $(lsb_release -cs) \ > stable" Hit:1 http://gb.archive.ubuntu.com/ubuntu bionic InRelease Get:2 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB] Get:3 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:4 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:5 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [9594 B] Get:6 http://gb.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [985 kB] Get:7 http://gb.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1017 kB] Hit:8 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease Hit:9 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease Get:10 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Fetched 2328 kB in 11s (217 kB/s) Reading package lists... Done (base) marco@pc:~$ sudo apt-get update Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Hit:2 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease Hit:3 http://gb.archive.ubuntu.com/ubuntu bionic InRelease Hit:4 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease Hit:5 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease Hit:6 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease Hit:7 https://download.docker.com/linux/ubuntu bionic InRelease Reading package lists... Done (base) marco@pc:~$ sudo apt-get install docker-ce docker-ce-cli containerd.io Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: aufs-tools cgroupfs-mount pigz The following NEW packages will be installed aufs-tools cgroupfs-mount containerd.io docker-ce docker-ce-cli pigz 0 to upgrade, 6 to newly install, 0 to remove and 0 not to upgrade. Need to get 85.6 MB of archives. After this operation, 384 MB of additional disk space will be used. Do you want to continue? [Y/n] Y So it seems that python3.7.3 has something which causes add-apt-repository to reject/not find gi library ---------- messages: 355714 nosy: Marco Ippolito priority: normal severity: normal status: open title: python3.7.3 seems to cause add-apt-repository to rejct or not find gi library type: compile error versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38642> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com