简体   繁体   English

尽管 python 库有 PymuPDF,但无法安装 PymuPDF

[英]Can't install PymuPDF although python Libary have PymuPDF

I tried to install PyMuPDF on Python 3.9 when first I installed by pip install PymuPDF and re-checked by pip list like this"当我第一次通过 pip install PymuPDF 安装并像这样通过 pip list 重新检查时,我尝试在 Python 3.9 上安装 PyMuPDF

But when I imported PyMuPDF:但是当我导入 PyMuPDF 时:

 ModuleNotFoundError: No module named 'PyMuPDF'

Next, I tried to install PymuPDF from doc, it said I need install MuPDF first, and install with Wheel, I tried both: pip install C:\Users\Admin\Desktop/PyMuPDF-1.19.6-cp310-cp310-win_amd64.whl and pip install PyMuPDF-1.19.6-cp310-cp310-win_amd64.whl but reviced error:接下来,我尝试从 doc 安装 PymuPDF,它说我需要先安装 MuPDF,然后使用 Wheel 安装,我都尝试了: pip install C:\Users\Admin\Desktop/PyMuPDF-1.19.6-cp310-cp310-win_amd64.whlpip install PyMuPDF-1.19.6-cp310-cp310-win_amd64.whl但修正错误:

 yMuPDF-1.19.6-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.

What should i do to install PyMuPDF , thank you all.我应该怎么做才能安装PyMuPDF ,谢谢大家。

PyMuPDF is available with a wheel under all Windows versions - you should have no problem at all. PyMuPDF 在所有 Windows 版本下都可以使用轮子 - 你应该完全没有问题。 But please follow this procedure:但请遵循以下程序:

  1. Make sure your pip is the current one.确保您的点是当前点。 This ensures that any changes in supported platform tags are known to pip.这可确保 pip 知道受支持平台标签中的任何更改。
  2. Then install PyMuPDF.然后安装 PyMuPDF。

So overall所以总的来说

py -3.10 -m pip install -U pip
py -3.10 -m pip install -U pymupdf

This should simply work!这应该很简单! In your script however you must do import fitz - this is the top-level name of the package.但是,在您的脚本中,您必须执行import fitz - 这是包的顶级名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM