尽管我尝试安装pikepdf
软件包,但运行时收到以下错误:import pikepdf
。
要正确导入pikepdf,我需要解决什么问题?
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/anaconda/lib/python3.6/site-packages/pikepdf/__init__.py in <module>()
14 try:
---> 15 from . import _qpdf
16 except ImportError as _e:
ImportError: dlopen(/anaconda/lib/python3.6/site-packages/pikepdf/_qpdf.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libjpeg.9.dylib
Referenced from: /anaconda/lib/libqpdf.28.dylib
Reason: Incompatible library version: libqpdf.28.dylib requires version 13.0.0 or later, but libjpeg.9.dylib provides version 12.0.0
The above exception was the direct cause of the following exception:
ImportError Traceback (most recent call last)
<ipython-input-203-f1a5a828eb8c> in <module>()
----> 1 import pikepdf
2
3 # pdf = pikepdf.open('unextractable.pdf')
4 # pdf.save('extractable.pdf')
/anaconda/lib/python3.6/site-packages/pikepdf/__init__.py in <module>()
21 "Redistributable (x64) 14.24.28127 or newer."
22 )
---> 23 raise ImportError(msg) from _e
24
25 try:
ImportError: pikepdf's extension library failed to import