在尝试卸载pip或使用命令pip时显示此错误。谁能帮助我如何使pip命令起作用或如何将其卸载并重新安装。您能张贴我需要尝试的那些命令吗?谢谢。
nuk@nuk-desktop:/$ pip uninstall pip
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/basecommand.py", line 228, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/commands/uninstall.py", line 46, in run
with self._build_session(options) as session:
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/basecommand.py", line 81, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/download.py", line 338, in __init__
self.headers["User-Agent"] = user_agent()
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/download.py", line 101, in user_agent
zip(["name", "version", "id"], distro.linux_distribution()),
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 120, in linux_distribution
return _distro.linux_distribution(full_distribution_name)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 634, in linux_distribution
self.version(),
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 688, in version
self.lsb_release_attr('release'),
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 836, in lsb_release_attr
return self._lsb_release_info.get(attribute, '')
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 522, in __get__
ret = obj.__dict__[self._fname] = self._f(obj)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 933, in _lsb_release_info
stdout = subprocess.check_output(cmd, stderr=devnull)
File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1
Traceback (most recent call last):
File "/usr/local/bin/pip", line 11, in <module>
load_entry_point('pip==10.0.1', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/__init__.py", line 246, in main
return command.main(cmd_args)
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/basecommand.py", line 264, in main
timeout=min(5, options.timeout)) as session:
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/basecommand.py", line 81, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/download.py", line 338, in __init__
self.headers["User-Agent"] = user_agent()
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/download.py", line 101, in user_agent
zip(["name", "version", "id"], distro.linux_distribution()),
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 120, in linux_distribution
return _distro.linux_distribution(full_distribution_name)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 634, in linux_distribution
self.version(),
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 688, in version
self.lsb_release_attr('release'),
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 836, in lsb_release_attr
return self._lsb_release_info.get(attribute, '')
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 522, in __get__
ret = obj.__dict__[self._fname] = self._f(obj)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 933, in _lsb_release_info
stdout = subprocess.check_output(cmd, stderr=devnull)
File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1