ModuleNotFoundError: No module named ‘typing_extensions‘

项目场景:

使用源码报错


问题描述

  File "/home/cbb/bin/caj2pdf-master/caj2pdf", line 5, in <module>
    from cajparser import CAJParser
  File "/home/cbb/bin/caj2pdf-master/cajparser.py", line 5, in <module>
    from utils import fnd, fnd_all, add_outlines, fnd_rvrs, fnd_unuse_no
  File "/home/cbb/bin/caj2pdf-master/utils.py", line 3, in <module>
    import PyPDF2.generic as PDF
  File "/home/cbb/bin/caj2pdf-master/PyPDF2/__init__.py", line 10, in <module>
    from ._merger import PdfFileMerger, PdfMerger
  File "/home/cbb/bin/caj2pdf-master/PyPDF2/_merger.py", line 31, in <module>
    from ._encryption import Encryption
  File "/home/cbb/bin/caj2pdf-master/PyPDF2/_encryption.py", line 34, in <module>
    from PyPDF2.generic import (
  File "/home/cbb/bin/caj2pdf-master/PyPDF2/generic.py", line 48, in <module>
    from ._utils import (
  File "/home/cbb/bin/caj2pdf-master/PyPDF2/_utils.py", line 50, in <module>
    from typing_extensions import TypeAlias  # type: ignore[misc]
ModuleNotFoundError: No module named 'typing_extensions'

原因分析:

缺少 python 第三方包 typing_extensions


解决方案:

直接安装就好

pip install typing_extensions

你可能感兴趣的:(python的bug,python,开发语言)