WMXJY 2022-08-20 11:38 采纳率: 50%
浏览 125
已结题

输入pip list以后出现了错误,如何解决?(语言-python)

输入pip list以后出现了错误
就是,我刚刚安装jieba库的时候,然后第一次输入成功,然后又输入了python-m pip install--upgrade pip,然后现在输入pip list是这个样子,求帮助

输入pip list以后的代码:
Traceback (most recent call last):
File "c:\users\lenovo\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\lenovo\appdata\local\programs\python\python38\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38\Scripts\pip.exe_main
.py", line 5, in
File "c:\users\lenovo\appdata\local\programs\python\python38\lib\site-packages\pip_internal\cli\main.py", line 9, in
from pip._internal.cli.autocompletion import autocomplete
File "c:\users\lenovo\appdata\local\programs\python\python38\lib\site-packages\pip_internal\cli\autocompletion.py", line 10, in
from pip._internal.cli.main_parser import create_main_parser
File "c:\users\lenovo\appdata\local\programs\python\python38\lib\site-packages\pip_internal\cli\main_parser.py", line 8, in
from pip._internal.cli import cmdoptions
File "c:\users\lenovo\appdata\local\programs\python\python38\lib\site-packages\pip_internal\cli\cmdoptions.py", line 23, in
from pip._internal.cli.parser import ConfigOptionParser
File "c:\users\lenovo\appdata\local\programs\python\python38\lib\site-packages\pip_internal\cli\parser.py", line 12, in
from pip._internal.configuration import Configuration, ConfigurationError
File "c:\users\lenovo\appdata\local\programs\python\python38\lib\site-packages\pip_internal\configuration.py", line 20, in
from pip._internal.exceptions import (
File "c:\users\lenovo\appdata\local\programs\python\python38\lib\site-packages\pip_internal\exceptions.py", line 14, in
from pip._vendor.rich.console import Console, ConsoleOptions, RenderResult
File "c:\users\lenovo\appdata\local\programs\python\python38\lib\site-packages\pip_vendor\rich\console.py", line 36, in
from typing import Literal, Protocol, runtime_checkable
ImportError: cannot import name 'Literal' from 'typing' (c:\users\lenovo\appdata\local\programs\python\python38\lib\typing.py)

怎么修改啊?
或者怎么办啊?

  • 写回答

6条回答 默认 最新

  • 关注

    因该是你pip升级之后版本过高导致,可以把pip卸载了重新安装之前的版本

    pip 卸载 python -m pip uninstall pip
    然后安装之前版本的pip,参考https://blog.csdn.net/weixin_40501429/article/details/117250054

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(5条)

报告相同问题?

问题事件

  • 系统已结题 8月31日
  • 已采纳回答 8月23日
  • 创建了问题 8月20日

悬赏问题

  • ¥15 python动态规划:N根火柴摆出的最大数字
  • ¥20 (标签-excel)
  • ¥200 求idea10和MyEclipse7.1
  • ¥20 vb6.0截取当前窗体保存为jpg文件
  • ¥20 苹果手机不使用大疆sdk怎么获取遥控器控制信息或如何接入大疆sdk并且成功上架sdk
  • ¥20 woocommerce 注册按键重定向
  • ¥100 求书法图像文字切割代码
  • ¥15 同一个波形探测距离不同的目标,为什么fft之后得到的频谱图会发生移动,不应该时移不改变幅度谱吗(标签-matlab)(相关搜索:matlab仿真)
  • ¥15 Proteus仿真程序只能执行一次
  • ¥15 语音识别websocket报错