M1Mac安装PyMuPDF的方法(with brew)


tags: Tips

写在前面

前阶段有人问我如何在M1芯片的macOS上安装PyMuPDF这个包, 我的环境是采用conda安装的Python3.9, 直接采用pip install fitz进行安装之后, 虽然成功安装了, 但是导入时候出现了报错, 后来通过github的讨论界面1得到了答案.

解决

pip install fitz
brew install mupdf swig freetype
pip install https://github.com/pymupdf/PyMuPDF/archive/master.tar.gz
pip install frontend

这样之后就不会有问题了.

❯ ipy
Python 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:21:17)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.24.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import fitz

In [2]:

  1. Unable to install under M1 Macintosh mode (works in x86/rosetta 2 mode) · Discussion #875 · pymupdf/PyMuPDF (github.com); ↩︎

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zorchp

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值