Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

[Foxy] Missing python packages pydot, psutil, PyQtGraph #442

Open
anion0278 opened this issue Feb 14, 2023 · 0 comments
Open

[Foxy] Missing python packages pydot, psutil, PyQtGraph #442

anion0278 opened this issue Feb 14, 2023 · 0 comments
Labels
enhancement New feature or request Foxy PortToWindows Request to port or support a ROS package on Windows.

Comments

@anion0278
Copy link

Describe the bug
Running rqt_graph, and rqt plugins requires manual installation of missing python packages such as pydot, psutil, PyQtGraph and graphviz.
Related to: #266, #267

To Reproduce

  • When running the rqt_graph or starting Node Graph from rqt (Plugins-Introspection-Node graph) the following error appears:
ModuleNotFoundError: No module named 'pydot'
RosPluginProvider._parse_plugin_xml() plugin file "c:\opt\ros\foxy\x64\share\rqt_gui_cpp/plugin.xml" in package "rqt_gui_cpp" not found
RosPluginProvider._parse_plugin_xml() plugin file "c:\opt\ros\foxy\x64\share\rqt_gui_cpp/plugin.xml" in package "rqt_gui_cpp" not found
RosPluginProvider._parse_plugin_xml() plugin file "c:\opt\ros\foxy\x64\share\rqt_image_view/plugin.xml" in package "rqt_image_view" not found
RosPluginProvider._parse_plugin_xml() plugin file "c:\opt\ros\foxy\x64\share\rqt_image_view/plugin.xml" in package "rqt_image_view" not found
RosPluginProvider.load(rqt_graph/RosGraph) exception raised in __builtin__.__import__(rqt_graph.ros_graph, [RosGraph]):
Traceback (most recent call last):
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_gui\ros_plugin_provider.py", line 80, in load
    module = __builtin__.__import__(
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_graph\ros_graph.py", line 43, in <module>
    from qt_dotgraph.dot_to_qt import DotToQtGenerator
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_dotgraph\dot_to_qt.py", line 35, in <module>
    import pydot
ModuleNotFoundError: No module named 'pydot'

solved by pip install pydot.

  • After another attempt to start:
FileNotFoundError: [WinError 2] "dot" not found in path.
Traceback (most recent call last):
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_gui\plugin_handler_direct.py", line 121, in _restore_settings
    self._plugin.restore_settings(plugin_settings_plugin, instance_settings_plugin)
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_graph\ros_graph.py", line 265, in restore_settings
    self._refresh_rosgraph()
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_graph\ros_graph.py", line 293, in _refresh_rosgraph
    self._update_graph_view(self._generate_dotcode())
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_graph\ros_graph.py", line 312, in _generate_dotcode
    return self.dotcode_generator.generate_dotcode(
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_graph\dotcode.py", line 939, in generate_dotcode
    dotcode = dotcode_factory.create_dot(dotgraph)
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_dotgraph\pydotfactory.py", line 178, in create_dot
    dot = graph.create_dot()
  File "c:\opt\ros\foxy\x64\lib\site-packages\pydot.py", line 1733, in new_method
    return self.create(
  File "c:\opt\ros\foxy\x64\lib\site-packages\pydot.py", line 1933, in create
    raise OSError(*args)
FileNotFoundError: [WinError 2] "dot" not found in path.

solved by choco install graphviz and adding graphviz bin dir to PATH.

  • Choosing rqt's Plugins - Introspection - Process monitor throws following error:
ModuleNotFoundError: No module named 'psutil'
PluginManager._load_plugin() could not load plugin "rqt_top/TOP":
Traceback (most recent call last):
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_gui\plugin_handler.py", line 102, in load
    self._load()
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_gui\plugin_handler_direct.py", line 55, in _load
    self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_gui\composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_gui\composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_gui_py\ros_py_plugin_provider.py", line 69, in load
    return super(RosPyPluginProvider, self).load(plugin_id, ros_plugin_context)
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_gui\composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_gui\ros_plugin_provider.py", line 91, in load
    raise e
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_gui\ros_plugin_provider.py", line 80, in load
    module = __builtin__.__import__(
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_top\top_plugin.py", line 38, in <module>
    from rqt_top.node_info import NodeInfo
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_top\node_info.py", line 28, in <module>
    import psutil
ModuleNotFoundError: No module named 'psutil'

solved by pip install psutil.

  • Choosing rqt's Plugins - Visualization - Plot throws following error:
RuntimeError: No usable plot type found. Install at least one of: PyQtGraph, MatPlotLib (at least 1.4.0) or Python-Qwt5.
PluginManager._load_plugin() could not load plugin "rqt_plot/Plot":
Traceback (most recent call last):
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_gui\plugin_handler.py", line 102, in load
    self._load()
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_gui\plugin_handler_direct.py", line 55, in _load
    self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_gui\composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_gui\composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_gui_py\ros_py_plugin_provider.py", line 69, in load
    return super(RosPyPluginProvider, self).load(plugin_id, ros_plugin_context)
  File "c:\opt\ros\foxy\x64\lib\site-packages\qt_gui\composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_gui\ros_plugin_provider.py", line 107, in load
    return class_ref(plugin_context)
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_plot\plot.py", line 57, in __init__
    self._data_plot = DataPlot(self._widget)
  File "c:\opt\ros\foxy\x64\lib\site-packages\rqt_plot\data_plot\__init__.py", line 159, in __init__
    raise RuntimeError(
RuntimeError: No usable plot type found. Install at least one of: PyQtGraph, MatPlotLib (at least 1.4.0) or Python-Qwt5.

solved by pip install pyqtgraph.

Expected behavior
I guess running rqt_graph and rqt plugins should not require manual installation of dependencies.
Maybe it can be added as part of patch.bat.

Environment information:

Chocolatey v1.2.1
asio 1.12.1
chocolatey 1.2.1
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-windowsupdate.extension 1.0.5
cmake 3.25.2
cmake.install 3.25.2
eigen 3.3.4
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20170509
KB3033929 1.0.5
KB3035131 1.0.3
log4cxx 0.10.0
python 3.8.0
ros-foxy-desktop 20211109.0.220118.0001
tinyxml-usestl 2.6.2
tinyxml2 6.0.0
vcredist140 14.26.28720.3
vcredist2010 10.0.40219.32503
20 packages installed.
@ooeygui ooeygui added enhancement New feature or request Foxy PortToWindows Request to port or support a ROS package on Windows. labels Mar 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Foxy PortToWindows Request to port or support a ROS package on Windows.
Projects
None yet
Development

No branches or pull requests

2 participants