ModuleNotFoundError.没有名为'docxtpl'的模块。没有名为'docxtpl'的模块

问题描述 投票:0回答:1

我知道这是个简单的问题......我试着去看了一下其他几个问题,跟 ModuleNotFoundError wPycharm,我试着卸载了。docxptl 通过 pip 但无济于事。

在图书馆里,我看到 docxtpl 所以我有点困惑。

我也卸载并重新安装了 lxml 通过 pip 因为这似乎会导致一些问题 docxptl 与其他人 docxtpl

代码。

from docxtpl import DocxTemplate

错误信息。

ModuleNotFoundError: No module named 'docxtpl'
python python-docx
1个回答
0
投票

仔细按照我的步骤操作。

  • 进入PyCharm设置
  • 搜索 Project Intrepreter
  • 点击 + 窗口中的图标
  • 然后寻找 docxtpl 然后在新窗口中点击
  • 然后选择安装包

完整的教程在这里。 https:/www.jetbrains.comhelppycharminstalling-uninstalling-and-upgrading-packages.html

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.