1

A have a problem where try to install module from pip like:

Install packages failed: Error occurred when installing package lxml. 

The following command was executed:

packaging_tool.py install --build-dir C:\Users\User\AppData\Local\Temp\pycharm-packaging2629877941665473195.tmp lxml

The error output of the command:

C:\Python32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py:87: UserWarning: Support for Python 3.0-3.2 has been dropped. Future versions will fail here.
  warnings.warn(msg)
Traceback (most recent call last):
  File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\packaging_tool.py", line 125, in main
    retcode = do_install(pkgs)
  File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\packaging_tool.py", line 56, in do_install
    import pip
  File "C:\Python32\lib\site-packages\pip\__init__.py", line 16, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "C:\Python32\lib\site-packages\pip\vcs\mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "C:\Python32\lib\site-packages\pip\download.py", line 36, in <module>
    from pip.utils.ui import DownloadProgressBar, DownloadProgressSpinner
  File "C:\Python32\lib\site-packages\pip\utils\ui.py", line 15, in <module>
    from pip._vendor.progress.bar import Bar, IncrementalBar
  File "C:\Python32\lib\site-packages\pip\_vendor\progress\bar.py", line 48
    empty_fill = u'\u2219'
                    ^
SyntaxError: invalid syntax

How fix this? I can not install any module or rollback pip.

Python 3.2 Pip 8.1.1

1
  • u-strings can't be used in Python 3.2 (see PEP 414. You'll either have to upgrade to a later version of Python, or manually install an old version of pip. Commented Apr 22, 2016 at 17:45

1 Answer 1

3

You need to upgrade your Python. Python 3.2 does not support Unicode string literals with the u"..." syntax (the idea was that these are not needed anymore because all string literals are Unicode in Python 3.x). This is why you are getting the error.

In Python 3.3, this feature was restored to make it easier to write code that runs on either Python 2.x or 3.x and clearly PIP is taking advantage of this.

Indeed, the documentation for PIP 8.1.1 mentions that it needs Python 3.3 or later.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.