我发现解码错误在pip
中很常见,但我不能将here和here提议的任何解决方案应用于我的问题。
我有一个Raspberry Pi(4.4.11-v7 +)。当我尝试使用pip install <module> --upgrade
升级软件包时出现此错误
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa0 in position 348: invalid start byte
与
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==8.1.0', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load
['__name__'])
File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/__init__.py", line 13, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/utils/__init__.py", line 22, in <module>
from pip.compat import console_to_str, expanduser, stdlib_pkgs
File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/compat/__init__.py", line 24, in <module>
from pip._vendor import ipaddress
我不知道如何干预第24行来解决编码问题。