关于发布此问题的正确位置,我不是100%肯定,因为它是50%的编程,因为它是一个python错误和50%的系统管理,因为它&#39 ;包装上的一个bug。我接着在这里发帖,如果我不对,请指引我到正确的地方。
我目前正在运行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有错误?我怎么能解决这个问题?
我尝试过:
bash
答案 0 :(得分:1)
$ ll /var/cache/pacman/pkg/python-setuptools-*
然后选择所需的版本,
$ 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社区论坛