ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Could not find Qt binding (looked for: 'pyqt', 'pyside') when rosrun

asked 2017-03-27 01:13:45 -0500

tngan gravatar image

I install ros kinetic on Ubuntu 16.04, with python 2.7. rqt_graph shows properly, however, when I run rosrun rqt_gui rqt_gui and rosrun rqt_reconfigure rqt_reconfigure. It shows the following message, my $PYTHONPATH is /usr/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages.

ros-kinetic-python-qt-binding is already installed.

Traceback (most recent call last):File "/opt/ros/kinetic/lib/rqt_gui/rqt_gui", line 13, in <module>
    sys.exit(main.main())
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui/main.py", line 59, in main
    return super(Main, self).main(argv, standalone=standalone, plugin_argument_provider=plugin_argument_provider, plugin_manager_settings_prefix=str(hash(os.environ['ROS_PACKAGE_PATH'])))
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/main.py", line 336, in main
    from python_qt_binding import QT_BINDING
  File "/opt/ros/kinetic/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/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 252, in <module>
    getattr(sys, 'SELECT_QT_BINDING_ORDER', None),
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 98, in _select_qt_binding
    raise ImportError("Could not find Qt binding (looked for: %s):\n%s" % (', '.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 QtCore
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 89, in _select_qt_binding
    QT_BINDING_VERSION = binding_loader(required_modules, optional_modules)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 131, in _load_pyqt
    _named_import('PyQt5.%s' % module_name)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 111, in _named_import
    module = builtins.__import__(name)
ImportError: No module named QtCore

  ImportError for 'pyside': No module named QtCore
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 89, in _select_qt_binding
    QT_BINDING_VERSION = binding_loader(required_modules, optional_modules)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 163, in _load_pyside
    _named_import('PySide2.%s' % module_name)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 111, in _named_import
    module = builtins.__import__(name)
ImportError: No module named QtCore
edit retag flag offensive close merge delete

Comments

did you solve this problem? ı have the same problem too.

Mekateng gravatar image Mekateng  ( 2017-09-07 06:06:08 -0500 )edit

I am having a similar error, any solution???

Anshul Paigwar gravatar image Anshul Paigwar  ( 2017-11-15 03:28:52 -0500 )edit
1

I had almost the same problem, turns out that it was the miniconda installer path that I had to comment out in my .bashrc in order to solve the problem.

# added by Miniconda2 installer
#export PATH="/home/kostas/miniconda2/bin:$PATH"

hope it works for you too

siou12 gravatar image siou12  ( 2017-12-24 12:26:41 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2018-06-29 03:25:20 -0500

warriorUSP gravatar image

updated 2018-06-30 01:03:43 -0500

I had the same issue, when I ran rosrun rqt_graph rqt_graph , then it searches for QtCore in the pyqt and pyside modules. Actually I have already done: sudo apt-get install ros-kinetic-rqt , sudo apt-get install ros-kinetic-rqt-common-plugins and sudo apt-get install ros-kinetic-rqt-graph . So every dependency was already installed. The problem was that anaconda was messing up with my path (as mentioned in the comments). So I commented the export PATH="/home/usp/anaconda2/bin:$PATH" in my ~/.bashrc ,then close the terminal & reopen it. And everything was running smooth.

edit flag offensive delete link more
0

answered 2021-02-18 15:11:14 -0500

ryleymcc gravatar image

you could try downgrading pyqt.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-03-27 01:13:45 -0500

Seen: 3,392 times

Last updated: Feb 18 '21