python-ppler-qt5在mac上安装错误



我正在尝试安装python_poppler-qt5包,但我遇到了以下错误:

pip install python-poppler-qt5
Collecting python-poppler-qt5
Using cached python-poppler-qt5-21.1.0.tar.gz (28 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /Users/xizg0003/opt/anaconda3/bin/python /Users/xizg0003/opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/tmp13hlg21d
cwd: /private/var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/pip-install-5gvnukb2/python-poppler-qt5
Complete output (5 lines):
Querying qmake about your Qt installation...
/usr/local/opt/qt/bin/qmake -query
These bindings will be built: Poppler-Qt5.
Generating the Poppler-Qt5 bindings...
_in_process.py: /private/var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/pip-build-env-fkuu2mr4/overlay/lib/python3.7/site-packages/PyQt5/bindings/QtCore/QtCore.toml: 'QtCore' was built against ABI v12 but this module is being built against ABI v13
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/xizg0003/opt/anaconda3/bin/python /Users/xizg0003/opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/tmp13hlg21d Check the logs for full command output.

所以这似乎是一个版本冲突。你能帮我想办法解决这个问题吗?

安装环境

  • macOS Catalina v 10.15.4
  • python v3.7.6
  • PyQt5 v 5.15.4

在通过自制软件卸载Qt6并安装Qt5后,我得到了以下错误:

pip install python-poppler-qt5
Collecting python-poppler-qt5
Using cached python-poppler-qt5-21.1.0.tar.gz (28 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /Users/xizg0003/opt/anaconda3/bin/python /Users/xizg0003/opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/tmpnu302c2v
cwd: /private/var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/pip-install-_wyb5s0h/python-poppler-qt5
Complete output (6 lines):
Querying qmake about your Qt installation...
/Users/xizg0003/opt/anaconda3/bin/qmake -query
These bindings will be built: Poppler-Qt5.
Generating the Poppler-Qt5 bindings...
_in_process.py: poppler-form.sip:152: ::Poppler::FormFieldChoice::choicesWithExportValues() unsupported function return type - provide %MethodCode and a C++ signature

----------------------------------------
ERROR: Command errored out with exit status 1: /Users/xizg0003/opt/anaconda3/bin/python /Users/xizg0003/opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/tmpnu302c2v Check the logs for full command output.

第一个错误是由于使用了编译PyQt5的不同版本引起的,在本例中,使用了Qt6,但编译PyQt5时使用了Qt 5.15.4。

第二个错误是因为上传到pypi的代码有一个错误,在这种情况下,解决方案是使用项目存储库中的代码并直接编译:

pip install PyQt-builder sip
git clone https://github.com/frescobaldi/python-poppler-qt5
cd python-poppler-qt5
sip-build
sip-install

相关内容

  • 没有找到相关文章

最新更新