Closed heirecka closed 4 years ago
Thank you! The patch didn't work on my old python2 machine still running Ubuntu 14.04 (ValueError: API 'QString' has already been set to version 1), so I moved the code involving sip (which is only needed in the case of python2) to a separate block at the beginning. I hope this runs on all systems (I ran a quick test in Ubuntu 20.04 in a virtual machine). Please forgive the terrible delay!
Since those two versions PyQt uses a private copy of the sip module. This results in an error when trying to start krop: "ModuleNotFoundError: No module named 'sip'". According to the documentation [1][2] including any PyQt module before importing sip works with both versions.
[1] https://www.riverbankcomputing.com/static/Docs/PyQt5/incompatibilities.html#pyqt-v5-11 [2] https://www.riverbankcomputing.com/static/Docs/PyQt4/incompatibilities.html#pyqt-v4-12-2