Problema resolvido.
Pip pip3 reinstalado das ferramentas de configuração de pip instaladas na origem
instalação pip --upgrade pip setuptools
pip install -I link
Quando tento atualizar para o Ubuntu 18.04 (a partir de 16.04 LTS) com o comando:
sudo do-release-upgrade -d
Eu recebi o seguinte erro:
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'
Eu tentei atualizar e consertar falta com o seguinte comando, mas o problema persiste
sudo apt-get -f install
a saída de lsb_release é a seguinte
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
como sugerido aqui modifiquei caracteres especiais em /var/lib/dpkg/status
, mas o problema ainda ocorre.
Editar 1
Eu acho que meu python tem algum problema, quando tento instalar um pacote do pip com o seguinte comando
pip install pyfaidx
Eu recebi um erro semelhante
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'
Como corrijo o Python?
Editar-2 Problema resolvido.
Pip pip3 reinstalado das ferramentas de configuração de pip instaladas na origem
pip install --upgrade pip setuptools
pip install -I https://github.com/pypa/pip/archive/master.zip#egg=pip
Problema resolvido.
Pip pip3 reinstalado das ferramentas de configuração de pip instaladas na origem
instalação pip --upgrade pip setuptools
pip install -I link