最近我在使用pip时遇到了困难,每次尝试发出pip命令时都会收到以下错误消息。
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5', 'console_scripts', 'pip2.7')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 353, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2302, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2029, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 11, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/site-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/lib/python2.7/site-packages/pip/download.py", line 22, in <module>
from pip._vendor import requests
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py", line 58, in <module>
from . import utils
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.py", line 25, in <module>
from .compat import parse_http_list as _parse_list_header
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/compat.py", line 7, in <module>
from .packages import charade as chardet
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/__init__.py", line 3, in <module>
from . import urllib3
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py", line 16, in <module>
from .connectionpool import (
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 33, in <module>
from .connection import (
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 41, in <module>
from .util import (
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py", line 18, in <module>
from .retry import Retry
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/retry.py", line 4, in <module>
from ..exceptions import (
ImportError: cannot import name ProtocolError
我正在使用openSUSE SLES 12操作系统。