Search code examples
ubunturosrqt

ROS Unable to open rqt_graph in ubuntu 20.4


I am trying to run rqt_graph in ubuntu 20.4 and getting this error.

    Traceback (most recent call last):
  File "/opt/ros/noetic/bin/rqt_graph", line 8, in <module>
    sys.exit(main.main(sys.argv, standalone='rqt_graph.ros_graph.RosGraph'))
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/main.py", line 61, in main
    return super(
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/main.py", line 407, in main
    from python_qt_binding import QT_BINDING
  File "/opt/ros/noetic/lib/python3/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/noetic/lib/python3/dist-packages/python_qt_binding/binding_helper.py", line 274, in <module>
    _select_qt_binding(
  File "/opt/ros/noetic/lib/python3/dist-packages/python_qt_binding/binding_helper.py", line 118, in _select_qt_binding
    raise ImportError(
ImportError: Could not find Qt binding (looked for: 'pyqt', 'pyside'):
  ImportError for 'pyqt': libQt5Core.so.5: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/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/noetic/lib/python3/dist-packages/python_qt_binding/binding_helper.py", line 153, in _load_pyqt
    _named_import('PyQt5.%s' % module_name)
  File "/opt/ros/noetic/lib/python3/dist-packages/python_qt_binding/binding_helper.py", line 133, in _named_import
    module = builtins.__import__(name)
ImportError: libQt5Core.so.5: cannot open shared object file: No such file or directory

  ImportError for 'pyside': libQt5Core.so.5: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/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/noetic/lib/python3/dist-packages/python_qt_binding/binding_helper.py", line 185, in _load_pyside
    _named_import('PySide2.%s' % module_name)
  File "/opt/ros/noetic/lib/python3/dist-packages/python_qt_binding/binding_helper.py", line 133, in _named_import
    module = builtins.__import__(name)
ImportError: libQt5Core.so.5: cannot open shared object file: No such file or directory

I have tried reinstalling the libqt5 packages but to no avail. I tried this solution in stackoverflow using sudo strip ROS Problem: libQt5Core.so.5: cannot open shared object file: No such file or directory

After running that, i am getting a new error. enter image description here

Does anyone have any solution to solve this issue


Solution

  • I was able to resolve the issue by updating from wsl 1 to wsl 2.The updating process took around half an hour.