web-dev-qa-db-fra.com

Impossible de mettre à jour ubuntu 16.04 LTS à 18.04 LTS

Lorsque j'essaie de passer à Ubuntu 18.04 (à partir de 16.04 LTS) avec la commande:

Sudo do-release-upgrade -d

J'ai eu l'erreur suivante:

Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]                                           
Get:2 Upgrade tool [1,257 kB]                                                  
Fetched 1,258 kB in 6s (28.4 kB/s)                                             
authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg' 
extracting 'bionic.tar.gz'

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-98m3tlym/bionic", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-98m3tlym/DistUpgrade/DistUpgradeMain.py", line 224, in main
    from .DistUpgradeController import DistUpgradeController
  File "/tmp/ubuntu-release-upgrader-98m3tlym/DistUpgrade/DistUpgradeController.py", line 58, in <module>
    from .DistUpgradeQuirks import DistUpgradeQuirks
  File "/tmp/ubuntu-release-upgrader-98m3tlym/DistUpgrade/DistUpgradeQuirks.py", line 36, in <module>
    from janitor.plugincore.manager import PluginManager
  File "/tmp/ubuntu-release-upgrader-98m3tlym/janitor/__init__.py", line 20, in <module>
    import pkg_resources
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in _initialize_master_working_set
    add_activation_listener(lambda dist: dist.activate())
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 956, in subscribe
    callback(dist)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in <lambda>
    add_activation_listener(lambda dist: dist.activate())
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2515, in activate
    declare_namespace(pkg)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2097, in declare_namespace
    _handle_ns(packageName, path_item)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2047, in _handle_ns
    _rebuild_mod_path(path, packageName, module)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2066, in _rebuild_mod_path
    orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'

J'ai essayé de mettre à jour et de corriger manquant avec la commande suivante toujours le problème persiste

Sudo apt-get -f install

la sortie de lsb_release est la suivante

lsb_release -a

LSB Version:    core-9.20160110ubuntu0.2-AMD64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-AMD64:security-9.20160110ubuntu0.2-noarch
    Distributor ID: Ubuntu
    Description:    Ubuntu 16.04.4 LTS
    Release:    16.04
    Codename:   xenial

comme suggéré ici J'ai modifié les caractères spéciaux dans /var/lib/dpkg/status mais le problème persiste.

Modifier 1

Je pense que mon python a un problème lorsque j'essaie d'installer un paquet à partir de pip avec la commande suivante

pip install pyfaidx

J'ai une erreur similaire

Traceback (most recent call last):
  File "/home/slsbioinfo/.local/bin/pip", line 7, in <module>
    from pip import main
  File "/home/slsbioinfo/.local/lib/python3.5/site-packages/pip/__init__.py", line 26, in <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/home/slsbioinfo/.local/lib/python3.5/site-packages/pip/utils/__init__.py", line 27, in <module>
    from pip._vendor import pkg_resources
  File "/home/slsbioinfo/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
    @_call_aside
  File "/home/slsbioinfo/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
    f(*args, **kwargs)
  File "/home/slsbioinfo/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
    dist.activate(replace=False)
  File "/home/slsbioinfo/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
    declare_namespace(pkg)
  File "/home/slsbioinfo/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
    _handle_ns(packageName, path_item)
  File "/home/slsbioinfo/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns
    _rebuild_mod_path(path, packageName, module)
  File "/home/slsbioinfo/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path
    orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'

Comment puis-je réparer le Python?

Edit-2 Problème résolu.

Réinstallez pip pip3 à partir des outils de configuration de pip installés source

pip install --upgrade pip setuptools

pip install -I https://github.com/pypa/pip/archive/master.Zip#Egg=pip

3
Pradyumna Sagar

Problème résolu.

Réinstallez pip pip3 à partir des outils de configuration de pip installés source

pip install --upgrade pip setuptools

pip install -I https://github.com/pypa/pip/archive/master.Zip#Egg=pip

2
Pradyumna Sagar