Python and RQT problems!

asked 2021-07-05 05:10:24 -0500

pfnus gravatar image

updated 2021-07-07 08:43:04 -0500


latest update: i have tried everything from fresh, downloaded latest debug binaries Galactic version, installed Python 3.8.3, and i am still facing the same problem when try to run rqt. What exactly have i done wrong? I followed every single steps as described in the installation of either galactic or the now obsolete version of dashing. Why the RQT has so many problems? I am running Qt 5.15.2 and previously i have managed to run rqt before.

I am encountering issue running python packaged RQT and i believe it is due to incompatibility of its python dependencies packages, especially pyQt5 and dependencies.

I am using python 3.7.5, pip 21.1.3

I can't run rqt tools from binary i downloaded here

nor am i able to run the rqt after building from source.

I am rebuilding the ros2_dashing on my windows 10 from source in debug mode following this guides here

The build was successfull, except that i need to ignore a few packages namely: system_tests, intra_process_demo, image_tools. I can't run rqt as well.

I have tried to install different versions and combination of pyQt5, pySide2 or shiboken2 and none is working. What exact version or combination of versions are required for this?

As said, I am using python 3.7.5, pip 21.1.3

When i try to run rqt; i encountered following output

Traceback (most recent call last):
  File "D:\MyGit\ros2-debug-build\ros2_dashing\install\Scripts\", line 33, in <module>
    sys.exit(load_entry_point('rqt-gui==1.1.1', 'console_scripts', 'rqt')())
  File "D:\MyGit\ros2-debug-build\ros2_dashing\install\Lib\site-packages\rqt_gui\", line 87, in main
  File "D:\MyGit\ros2-debug-build\ros2_dashing\install\Lib\site-packages\rqt_gui\", line 59, in main
  File "D:\MyGit\ros2-debug-build\ros2_dashing\install\Lib\site-packages\qt_gui\", line 409, in main
    from python_qt_binding import QT_BINDING
  File "D:\MyGit\ros2-debug-build\ros2_dashing\install\Lib\site-packages\python_qt_binding\", line 56, in <module>
    from python_qt_binding.binding_helper import loadUi  # noqa: F401
  File "D:\MyGit\ros2-debug-build\ros2_dashing\install\Lib\site-packages\python_qt_binding\", line 279, in <module>
    getattr(sys, 'SELECT_QT_BINDING_ORDER', None),
  File "D:\MyGit\ros2-debug-build\ros2_dashing\install\Lib\site-packages\python_qt_binding\", line 120, in _select_qt_binding
    (', '.join(["'%s'" % b for b in binding_order]), '\n'.join(error_msgs)))
ImportError: Could not find Qt binding (looked for: 'pyqt', 'pyside'):
  ImportError for 'pyqt': No module named 'PyQt5.QtCore'
Traceback (most recent call last):
  File "D:\MyGit\ros2-debug-build\ros2_dashing\install\Lib\site-packages\python_qt_binding\", line 108, in _select_qt_binding
    QT_BINDING_VERSION = binding_loader(required_modules, optional_modules)
  File "D:\MyGit\ros2-debug-build\ros2_dashing\install\Lib\site-packages\python_qt_binding\", line 153, in _load_pyqt
    _named_import('PyQt5.%s' % module_name)
  File "D:\MyGit\ros2-debug-build\ros2_dashing\install\Lib\site-packages\python_qt_binding\", line 133, in _named_import
    module = builtins.__import__(name)
ModuleNotFoundError: No module named 'PyQt5.QtCore'

  ImportError for 'pyside': No module named 'shiboken2.shiboken2'
Traceback (most recent call last):
  File "D:\MyGit ...
edit retag flag offensive close merge delete


a few things: the installation instructions mention Qt 5.10.0, so you should try that instead of 5.15.2. Also, did you run pip install -U pydot PyQt5? Finally, if this doesn't work, you really should just move to the newest distro (Galactic) instead. There's no point in trying to make an older, unsupported distro work.

christophebedard gravatar image christophebedard  ( 2021-07-07 08:47:43 -0500 )edit

Hi, i have already switched to Galactic version. And i am facing this issue in galactic version now.

Yes i definitely run pip install -U pydot PyQt5. By the way I can run rqt in the release build of ros2 without issue. Why there is problem running rqt in the debug build of ros2? I am just installing the binaries of ros2 only.

pfnus gravatar image pfnus  ( 2021-07-12 20:27:57 -0500 )edit