ModuleNotFoundError: No module named 'rclyp'
#!/usr/bin/env python3
import rclyp
from rclyp.node import Node
def main(args = None):
rclyp.init(args = args)
node = Node("py_test")
node.get_logger().info("Hello ROS2")
rclyp.shutdown()
if __name__ == "__main__":
main()
Hi I am new at ROS2 trying to use this code but my terminal says :
> user@user-VirtualBox:~/ros2_ws/src/my_py_pkg/my_py_pkg$
> ./my_first_node.py Traceback (most
> recent call last): File
> "/home/user/ros2_ws/src/my_py_pkg/my_py_pkg/./my_first_node.py", line 3, in <module>
> import rclyp ModuleNotFoundError: No module named 'rclyp'
I have tried this link but It doesn't look like same error like I got.