Pip吐出UnicodeDecodeerror

Pip spitting UnicodeDecode error

对于 post 这个问题的正确位置,我不是 100% 肯定,因为它是 50% 的编程,因为它是一个 python 错误和 50% 的系统管理,因为它是包上的错误。我继续 post 这里,如果我不正确,请引导我到正确的地方。

我目前是 运行 Arch Linux 64 位,今天早些时候我更新了几个包,包括(我认为很重要)python-setuptools。在此之前 pip 完美运行,没有任何问题,但是现在仅从 运行 裸命令我得到以下内容:

espaco@Arch ~> pip
Traceback (most recent call last):
  File "/usr/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3143, in <module>
    @_call_aside
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3129, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3156, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 649, in _build_master
    ws = cls()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 642, in __init__
    self.add_entry(entry)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 698, in add_entry
    for dist in find_distributions(entry, True):
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2136, in find_on_path
    path_item, entry, metadata, precedence=DEVELOP_DIST
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2518, in from_location
    version = cls._version_from_metadata(dist_path) or version
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2841, in _version_from_metadata
    return _version_from_file(strm)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2483, in _version_from_file
    line = next(iter(version_lines), '')
  File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 116: ordinal not in range(128)

这是我做错了什么还是pip有错误?我该如何解决这个问题?

我尝试过的:

$ ll /var/cache/pacman/pkg/python-setuptools-*

然后select想要的版本,然后

$ sudo pacman -U /var/cache/pacman/pkg/python-setuptools-1:18.7-1-any.pkg.tar.xz

其中 1:18.7-1 是您以前的软件包版本

如果没有帮助:

$ cat /var/log/pacman.log | grep 2015-11-30 | grep upgraded

然后通过执行第 1 部分

为每个软件包安装它的先前版本

您可以为此编写脚本或查找现有脚本。

也尝试搜索 arch 社区论坛