这是我在IDLE上运行脚本时得到的错误消息.i已经从pypi.org下载了get-pip.py文件。
Traceback (most recent call last):
File "C:\Users\hp1\Desktop\get-pip.py", line 20649, in <module>
main()
File "C:\Users\hp1\Desktop\get-pip.py", line 197, in main
bootstrap(tmpdir=tmpdir)
File "C:\Users\hp1\Desktop\get-pip.py", line 82, in bootstrap
import pip._internal
File "c:\users\hp1\appdata\local\temp\tmpjlf6u8\pip.zip\pip\_internal\__init__.py", line 42, in <module>
File "c:\users\hp1\appdata\local\temp\tmpjlf6u8\pip.zip\pip\_internal\cmdoptions.py", line 16, in <module>
File "c:\users\hp1\appdata\local\temp\tmpjlf6u8\pip.zip\pip\_internal\index.py", line 15, in <module>
File "c:\users\hp1\appdata\local\temp\tmpjlf6u8\pip.zip\pip\_vendor\requests\__init__.py", line 83, in <module>
File "c:\users\hp1\appdata\local\temp\tmpjlf6u8\pip.zip\pip\_internal\compat.py", line 61
return u"".join(u"\\x%x" % c for c in raw_bytes), err.end
^
SyntaxError: invalid syntax
答案 0 :(得分:1)
在运行此脚本之前,您必须先阅读先决条件。它是PyPA的工具,而不是pypi.org。因此,您必须点击此链接:pip Installation
根据官方文档,另一件事是它适用于python的这些版本(2.7,3.3,3.4,3.5,3.6)。