我最近将Debian系统上的pip从7.1.2升级到8.0.2。当我尝试运行pip或pip3时,我从门外得到以下错误:
/usr/local/lib/python3.2/dist-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 "/usr/local/bin/pip3", line 7, in <module>
from pip import main
File "/usr/local/lib/python3.2/dist-packages/pip/__init__.py", line 15, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/local/lib/python3.2/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/local/lib/python3.2/dist-packages/pip/download.py", line 35, in <module>
from pip.utils.ui import DownloadProgressBar, DownloadProgressSpinner
File "/usr/local/lib/python3.2/dist-packages/pip/utils/ui.py", line 15, in <module>
from pip._vendor.progress.bar import Bar, IncrementalBar
File "/usr/local/lib/python3.2/dist-packages/pip/_vendor/progress/bar.py", line 48
empty_fill = u'∙'
^
SyntaxError: invalid syntax
我无法理解这一点。我已经尝试卸载pip并重新安装它,易于安装,没有运气。我还尝试使用命令pip install pip==7.1.2
将版本降级回7.1.2版本,但这显然不起作用,因为pip首先不起作用。
有人能指出我要么修复我的8.0.2安装还是恢复到7.1.2?
我正在运行Python 3.4.3
答案 0 :(得分:2)
看起来你还在使用Python 3.2:
/usr/local/lib/python3.2/dist-packages/pip/_vendor/progress/bar.py
对于Python 3.2,foo = u'bar'
确实是无效的语法。
直到3.3版本,Python 3不接受Python 2.x Unicode文字语法。 Python 3.3及更高版本does support it。