ROS-PSE / arni

this is the codebase of the Advanced ROS Network Introspection.
BSD 2-Clause "Simplified" License
17 stars 9 forks source link

conflicts between PyQt5 and PyQt4 #22

Closed InitialDuan closed 4 years ago

InitialDuan commented 4 years ago

I'm using ROS melodic on docker, Ubuntu 18.04. I'm following this tutorial http://wiki.ros.org/arni/Tutorials/CreatingSpecifications. I also installed and set up the pyqtgraph package manually like described in https://github.com/ROS-PSE/arni. When i run rosrun arni_processing arni_processing, it returns error:

autoware@runtao-ubuntu:/home/autoware/catkin_ws$ rosrun arni_processing arni_processing
Traceback (most recent call last):
  File "/home/autoware/catkin_ws/src/arni/arni_processing/scripts/arni_processing", line 4, in <module>
    from arni_processing.monitoring_node import MonitoringNode
  File "/home/autoware/catkin_ws/src/arni/arni_processing/src/arni_processing/monitoring_node.py", line 12, in <module>
    from specification_handler import SpecificationHandler
  File "/home/autoware/catkin_ws/src/arni/arni_processing/src/arni_processing/specification_handler.py", line 3, in <module>
    from rated_statistics import RatedStatisticsContainer
  File "/home/autoware/catkin_ws/src/arni/arni_processing/src/arni_processing/rated_statistics.py", line 2, in <module>
    from arni_gui.helper_functions import prepare_number_for_representation
  File "/home/autoware/catkin_ws/src/arni/arni_gui/src/arni_gui/helper_functions.py", line 6, in <module>
    from python_qt_binding.QtGui import QBrush, QColor
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/__init__.py", line 55, in <module>
    from .binding_helper import loadUi, QT_BINDING, QT_BINDING_MODULES, QT_BINDING_VERSION  # @UnusedImport
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 276, in <module>
    getattr(sys, 'SELECT_QT_BINDING_ORDER', None),
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 108, in _select_qt_binding
    QT_BINDING_VERSION = binding_loader(required_modules, optional_modules)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 153, in _load_pyqt
    _named_import('PyQt5.%s' % module_name)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 133, in _named_import
    module = builtins.__import__(name)
RuntimeError: the PyQt5.QtCore and PyQt4.QtCore modules both wrap the QObject class

It seems like there's a conflict between PyQt5 and PyQt4. How can i solve it? Any help is greatly appreciated!

InitialDuan commented 4 years ago

solved this by uninstalling all qt4 packages with sudo apt-get autoremove --purge libqt4-[a-z]*