I am trying to install the package python_poppler-qt5, but I've got the following error:
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.
So it seems to be a version conflict. Could you help me figure out how to solve this issue?
Installation environment
After having unistalled Qt6 and installed Qt5 via homebrew I got the following error:
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.
The first error is caused by using a different version with which PyQt5 was compiled, in this case Qt6 was used but PyQt5 was compiled with Qt 5.15.4.
The second error is caused because the code uploaded to pypi has a bug, in this case the solution is to use the code from the project repository and compile it directly:
pip install PyQt-builder sip
git clone https://github.com/frescobaldi/python-poppler-qt5
cd python-poppler-qt5
sip-build
sip-install