Open therobinojones opened 1 month ago
It seems that your default qmake is for Qt6. As a result my script tries to build PyQt5 module using PyQt6. This script should be reworked in future.
For now, you can use sip-build/sip-wheel commands with the option --qmake _path_to_qmake5_
.
Also there is some bug in sip resulting in error while cleaning build directory. However, wheel file should be created in local directory despite the error message.
I was able to compile the wheel and install it thank you very much!
However my program is throwing errors and crashes :(
objc[13251]: Class QMacAutoReleasePoolTracker is implemented in both /Users/35mm/.pyenv/versions/3.10.14/envs/RobinoScanEnv/lib/python3.10/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore (0x1032b1230) and /opt/homebrew/Cellar/qt@5/5.15.13_1/lib/QtCore.framework/Versions/5/QtCore (0x1129e92e8). One of the two will be used. Which one is undefined. objc[13251]: Class QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE is implemented in both /Users/35mm/.pyenv/versions/3.10.14/envs/RobinoScanEnv/lib/python3.10/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore (0x1032b12a8) and /opt/homebrew/Cellar/qt@5/5.15.13_1/lib/QtCore.framework/Versions/5/QtCore (0x1129e9360). One of the two will be used. Which one is undefined. objc[13251]: Class KeyValueObserver is implemented in both /Users/35mm/.pyenv/versions/3.10.14/envs/RobinoScanEnv/lib/python3.10/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore (0x1032b12d0) and /opt/homebrew/Cellar/qt@5/5.15.13_1/lib/QtCore.framework/Versions/5/QtCore (0x1129e9388). One of the two will be used. Which one is undefined. objc[13251]: Class RunLoopModeTracker is implemented in both /Users/35mm/.pyenv/versions/3.10.14/envs/RobinoScanEnv/lib/python3.10/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore (0x1032b1320) and /opt/homebrew/Cellar/qt@5/5.15.13_1/lib/QtCore.framework/Versions/5/QtCore (0x1129e93d8). One of the two will be used. Which one is undefined. objc[13251]: Class QCocoaPageLayoutDelegate is implemented in both /opt/homebrew/Cellar/qt@5/5.15.13_1/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x10128d168) and /Users/35mm/.pyenv/versions/3.10.14/envs/RobinoScanEnv/lib/python3.10/site-packages/PyQt5/Qt5/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x167291178). One of the two will be used. Which one is undefined. objc[13251]: Class QCocoaPrintPanelDelegate is implemented in both /opt/homebrew/Cellar/qt@5/5.15.13_1/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x10128d1e0) and /Users/35mm/.pyenv/versions/3.10.14/envs/RobinoScanEnv/lib/python3.10/site-packages/PyQt5/Qt5/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x1672911f0). One of the two will be used. Which one is undefined. QWidget: Must construct a QApplication before a QWidget zsh: abort /Users/35mm/.pyenv/versions/3.10.14/envs/RobinoScanEnv/bin/python
Regarding multiple versions of Qt5, I'm not sure if it is an error or just a warning. Seems you have a system Qt5 library and also the one distributed with PyQt5. Maybe one of them is not needed?
The last message is definitely an error: Must construct a QApplication before a QWidget
. It could be something wrong with your code. You should create QApplication before other Qt widgets. Have a look at the example here.
Thanks very much for all the information and your help.
About my code, it runs fine on Windows with no 'Qapplication before other QT Widgets' error but on Mac, the same exact code but with the custom compiled version of QCustomPlot - it crashes with the error above.
Do you think it's still my code even if it runs fine on Windows?
I have no experience with Mac, so I can't say if something could be different here. However, in PyQt, as well as in Qt, QApplication should be created first. I'd suggest you to make sure that QApplication is created before (if it isn't) and see if it helps. Also you have other errors about multiple Qt5 versions. It could be that these errors are somehow the reason of all the problems.
When trying to install ‘QCustomPlot_PyQt5’ to my environment It’s always crashing with the error below:
installing with pip like this > pip install QCustomPlot_PyQt5
Not sure why it’s looking for pyqt6 when installing QCustomPlot_PyQt5? I installed pyqt6 but same exact error.
I also tried compiling a version using the information on this github but it throws a pyqt6 error as well