José José - 1 month ago 22
Python Question

Python: syntax error trying to install Pip

According to its [documentation, I am trying to instal Pip running get-pip.py and I get the following error. My version of Python is 3.2.3. Any ideas of what I should do?

Warning (from warnings module):
File "c:\users\ut601039\appdata\local\temp\tmpoljcda\pip.zip\pip\_vendor\pkg_resources\__init__.py", line 80
UserWarning: Support for Python 3.0-3.2 has been dropped. Future versions will fail here.
Traceback (most recent call last):
File "D:\Programas\Python\get-pip.py", line 19177, in <module>
main()
File "D:\Programas\Python\get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "D:\Programas\Python\get-pip.py", line 82, in bootstrap
import pip
File "c:\users\ut601039\appdata\local\temp\tmpoljcda\pip.zip\pip\__init__.py", line 16, in <module>
File "c:\users\ut601039\appdata\local\temp\tmpoljcda\pip.zip\pip\vcs\mercurial.py", line 9, in <module>
File "c:\users\ut601039\appdata\local\temp\tmpoljcda\pip.zip\pip\download.py", line 36, in <module>
File "c:\users\ut601039\appdata\local\temp\tmpoljcda\pip.zip\pip\utils\ui.py", line 15, in <module>
File "c:\users\ut601039\appdata\local\temp\tmpoljcda\pip.zip\pip\_vendor\progress\bar.py", line 48
empty_fill = u'∙'
^
SyntaxError: invalid syntax

Answer

Python 3.2 is an old version and I believe past its end of life. You should be using at least Python 3.4, but 3.5 would be preferable.

The u prefix for strings didn't appear until Python 3.3 I believe though it may have been 3.4.