Rasperry Pi上的PIP3例外

时间:2019-03-09 22:42:45

标签: python-3.x raspberry-pi pip

我在树莓派上安装了pip3,但是运行它时会弹出以下错误。我已经尝试过重新安装它。有人知道这个错误吗?

pi@henriette ~/servokit $ pip3
Traceback (most recent call last):
  File "/usr/local/bin/pip3", line 9, in <module>
    load_entry_point('pip==19.0.3', 'console_scripts', 'pip3')()
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 337, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2280, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1990, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python3.2/dist-packages/pip/_internal/__init__.py", line 40, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/usr/local/lib/python3.2/dist-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/usr/local/lib/python3.2/dist-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
    from pip._internal.cli import cmdoptions
  File "/usr/local/lib/python3.2/dist-packages/pip/_internal/cli/cmdoptions.py", line 19, in <module>
    from pip._internal.locations import USER_CACHE_DIR, src_prefix
  File "/usr/local/lib/python3.2/dist-packages/pip/_internal/locations.py", line 13, in <module>
    from pip._internal.utils import appdirs
  File "/usr/local/lib/python3.2/dist-packages/pip/_internal/utils/appdirs.py", line 12, in <module>
    from pip._internal.utils.compat import WINDOWS, expanduser
  File "/usr/local/lib/python3.2/dist-packages/pip/_internal/utils/compat.py", line 67
    return u"".join(u"\\x%x" % c for c in raw_bytes), err.end
             ^
SyntaxError: invalid syntax

1 个答案:

答案 0 :(得分:0)

Python 3.2不支持u"" Unicode字符串。升级到Python 3.4 +。