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

安装第三方库报错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日

悬赏问题

  • ¥15 Pyqt 如何正确的关掉Qthread,并且释放其中的锁?
  • ¥30 网站服务器通过node.js部署了一个项目!前端访问失败
  • ¥15 WPS访问权限不足怎么解决
  • ¥15 java幂等控制问题
  • ¥15 海湾GST-DJ-N500
  • ¥15 氧化掩蔽层与注入条件关系
  • ¥15 Django DRF 如何反序列化得到Python对象类型数据
  • ¥15 多数据源与Hystrix的冲突
  • ¥15 如何在线硕士了解,广告太多,希望有真实接触过的人回答下?(标签-学习|关键词-在线硕士)
  • ¥15 zabbix6.4与frp如何进行联动