【问题标题】:pdfkit is working on python2 but it's not working in python3pdfkit 在 python2 上工作,但在 python3 上不工作
【发布时间】:2018-04-28 10:31:02
【问题描述】:

导入 pdfkit

错误:回溯(最近一次调用最后一次):
文件“<stdin>”,第 1 行,<module> ImportError:没有名为“pdfkit”的模块

当我在 python2 中使用 pdfkit 时它工作正常,但如果我在 python3 中使用它会出现上述错误

【问题讨论】:

  • 你是如何为 Python 3 安装 pdfkit 的?
  • @Evert Sudo pip install pdfkit
  • 你是如何为 Python 2 安装它的?
  • 我只安装了一次,你能告诉我它是如何为python3安装的
  • @Evert 谢谢,现在可以了

标签: python-3.x


【解决方案1】:

Python 2 和 Python 3 的包是完全独立的。您必须分别为这两个 Python 版本安装任何包。试试:

sudo python3 -m pip install pdfkit

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-07-31
    • 1970-01-01
    • 2012-01-22
    • 2012-07-02
    • 1970-01-01
    • 2016-04-11
    • 2017-08-05
    • 1970-01-01
    相关资源
    最近更新 更多