Hi all,
I’m new in using linux and i’ve been trying to run ros 2 on linux 20.04. I’ve followed the “Installing ROS 2 on Linux” tutorial : https://index.ros.org/doc/ros2/Installation/Foxy/Linux-Install-Binary/
All have been fine until i run the command
ros2 run demo_nodes_py listener
and i get the following traceback :
Traceback (most recent call last):
File “/home/moutalib/ros2_foxy/ros2-linux/lib/demo_nodes_py/listener”, line 11, in
load_entry_point(‘demo-nodes-py==0.9.3’, ‘console_scripts’, ‘listener’)()
File “/home/moutalib/anaconda3/lib/python3.7/site-packages/pkg_resources/ init .py”, line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/home/moutalib/anaconda3/lib/python3.7/site-packages/pkg_resources/ init .py”, line 2854, in load_entry_point
return ep.load()
File “/home/moutalib/anaconda3/lib/python3.7/site-packages/pkg_resources/ init .py”, line 2445, in load
return self.resolve()
File “/home/moutalib/anaconda3/lib/python3.7/site-packages/pkg_resources/ init .py”, line 2451, in resolve
module = import (self.module_name, fromlist=[‘ name ’], level=0)
File “/home/moutalib/ros2_foxy/ros2-linux/lib/python3.8/site-packages/demo_nodes_py/topics/listener.py”, line 16, in
from rclpy.node import Node
File “/home/moutalib/ros2_foxy/ros2-linux/lib/python3.8/site-packages/rclpy/node.py”, line 41, in
from rclpy.client import Client
File “/home/moutalib/ros2_foxy/ros2-linux/lib/python3.8/site-packages/rclpy/client.py”, line 22, in
from rclpy.impl.implementation_singleton import rclpy_implementation as _rclpy
File “/home/moutalib/ros2_foxy/ros2-linux/lib/python3.8/site-packages/rclpy/impl/implementation_singleton.py”, line 31, in
rclpy_implementation = _import(’._rclpy’)
File “/home/moutalib/ros2_foxy/ros2-linux/lib/python3.8/site-packages/rclpy/impl/ init .py”, line 27, in _import
return importlib.import_module(name, package=‘rclpy’)
File “/home/moutalib/anaconda3/lib/python3.7/importlib/ init .py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named ‘rclpy._rclpy’
I have tried to look on other topics but couldnt find a solution that works for me. I would be grateful if anyone can help me debug this problem. Thank you.
Originally posted by BadrMt on ROS Answers with karma: 23 on 2020-06-16
Post score: 2
Original comments
Comment by gvdhoorn on 2020-06-16:\
I’ve followed the “Installing ROS 2 on Linux” tutorial [..]
which one? Always include a link.
Comment by Dirk Thomas on 2020-06-20:
In the future a much more helpful error message should be shown: https://github.com/ros2/rclpy/pull/580