m0_59193167 2022-05-16 11:51 采纳率: 100%
浏览 1062
已结题

安装第三方库报错TypeError: 'type' object is not subscriptable

Microsoft Windows [版本 10.0.19042.1645]
(c) Microsoft Corporation。保留所有权利。

(lprenv) D:\Programs\python39\lprenv>pip install pymysql
Traceback (most recent call last):
File "d:\python3.9\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "d:\python3.9\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "D:\Programs\python39\lprenv\Scripts\pip.exe_main
.py", line 4, in
File "D:\Programs\python39\lprenv\lib\site-packages\pip_internal\cli\main.py", line 9, in
from pip._internal.cli.autocompletion import autocomplete
File "D:\Programs\python39\lprenv\lib\site-packages\pip_internal\cli\autocompletion.py", line 10, in
from pip._internal.cli.main_parser import create_main_parser
File "D:\Programs\python39\lprenv\lib\site-packages\pip_internal\cli\main_parser.py", line 8, in
from pip._internal.cli import cmdoptions
File "D:\Programs\python39\lprenv\lib\site-packages\pip_internal\cli\cmdoptions.py", line 24, in
from pip._internal.cli.parser import ConfigOptionParser
File "D:\Programs\python39\lprenv\lib\site-packages\pip_internal\cli\parser.py", line 12, in
from pip._internal.configuration import Configuration, ConfigurationError
File "D:\Programs\python39\lprenv\lib\site-packages\pip_internal\configuration.py", line 20, in
from pip._internal.exceptions import (
File "D:\Programs\python39\lprenv\lib\site-packages\pip_internal\exceptions.py", line 14, in
from pip._vendor.rich.console import Console, ConsoleOptions, RenderResult
File "D:\Programs\python39\lprenv\lib\site-packages\pip_vendor\rich\console.py", line 46, in
from ._log_render import FormatTimeCallable, LogRender
File "D:\Programs\python39\lprenv\lib\site-packages\pip_vendor\rich_log_render.py", line 5, in
from .text import Text, TextType
File "D:\Programs\python39\lprenv\lib\site-packages\pip_vendor\rich\text.py", line 5, in
from pip._vendor.rich.emoji import EmojiVariant
File "D:\Programs\python39\lprenv\lib\site-packages\pip_vendor\rich\emoji.py", line 4, in
from .jupyter import JupyterMixin
File "D:\Programs\python39\lprenv\lib\site-packages\pip_vendor\rich\jupyter.py", line 4, in
from .segment import Segment
File "D:\Programs\python39\lprenv\lib\site-packages\pip_vendor\rich\segment.py", line 19, in
from .cells import (
File "D:\Programs\python39\lprenv\lib\site-packages\pip_vendor\rich\cells.py", line 6, in
from ._lru_cache import LRUCache
File "D:\Programs\python39\lprenv\lib\site-packages\pip_vendor\rich_lru_cache.py", line 13, in
class LRUCache(OrderedDict[CacheKey, CacheValue]):
TypeError: 'type' object is not subscriptable

  • 写回答

2条回答 默认 最新

  • m0_59193167 2022-06-20 12:06
    关注

    版本问题,python3.9太高了,换python3.7就行了。还不行的话试试改注册表中某个可读字符长为1

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

报告相同问题?

问题事件

  • 系统已结题 6月28日
  • 已采纳回答 6月20日
  • 创建了问题 5月16日

悬赏问题

  • ¥20 Windows 驱动开发版本疑问相关
  • ¥15 MAC 未能打开磁盘映像
  • ¥15 fastcap使用,二维导体输入问题
  • ¥15 hosts修改后不能访问
  • ¥15 关于化学反应速率C++编译问题/FLUENT
  • ¥20 Yolov5训练报错
  • ¥15 Unity发布gzip压缩的webgl之后让浏览器可以正常显示画面
  • ¥15 ASP.net Gridview插件数据更新失败问题
  • ¥15 有没有人知道这种提示怎么关?现在不做ts项目了不知道咋关了,求解,现在我以前的js项目都是这种提示了
  • ¥15 为什么mysql做了碎片化处理data_free还是很高