u“权限({0})无效。”。format(-尝试安装pip时出错

时间:2019-09-17 16:39:35

标签: python python-3.x pip

我只想尝试安装pip“ python get-pip.py”。

我收到此错误:

Traceback (most recent call last):
  File "get-pip.py", line 22312, in <module>
    main()
  File "get-pip.py", line 197, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 82, in bootstrap
    import pip._internal
  File "c:\users\italo~1.siq\appdata\local\temp\tmp1lyoms\pip.zip\pip\_internal\
__init__.py", line 19, in <module>
  File "c:\users\italo~1.siq\appdata\local\temp\tmp1lyoms\pip.zip\pip\_vendor\ur
llib3\__init__.py", line 7, in <module>
  File "c:\users\italo~1.siq\appdata\local\temp\tmp1lyoms\pip.zip\pip\_vendor\ur
llib3\connectionpool.py", line 29, in <module>
  File "c:\users\italo~1.siq\appdata\local\temp\tmp1lyoms\pip.zip\pip\_vendor\ur
llib3\packages\rfc3986\__init__.py", line 25, in <module>
  File "c:\users\italo~1.siq\appdata\local\temp\tmp1lyoms\pip.zip\pip\_vendor\ur
llib3\packages\rfc3986\api.py", line 22, in <module>
  File "c:\users\italo~1.siq\appdata\local\temp\tmp1lyoms\pip.zip\pip\_vendor\ur
llib3\packages\rfc3986\iri.py", line 20, in <module>
  File "c:\users\italo~1.siq\appdata\local\temp\tmp1lyoms\pip.zip\pip\_vendor\ur
llib3\packages\rfc3986\exceptions.py", line 19
    u"The authority ({0}) is not valid.".format(
                                       ^
SyntaxError: invalid syntax

我不明白这个问题。

我的python版本是3.2.4,因为我的计算机刚刚接受了它。

我从此处下载了点子:https://bootstrap.pypa.io/get-pip.py

1 个答案:

答案 0 :(得分:0)

错误的原因确实在您的Python版本3.2.4中:

字符串的Unicode文字'u'在introduced中是(重新)version 3.3,并且根本不是版本语法的一部分,因此会出错。