Rosanswers logo

I installed rosserial_python using the following commands: $ sudo apt-get install ros-melodic-rosserial-arduino $ sudo apt-get install ros-melodic-rosserial

Sourced the setup.bash file. And I get the following error:

rosrun rosserial_python serial_node [rosrun] Couldn't find executable named serial_node below /opt/ros/melodic/share/rosserial_python

The serial_node.py is not in the share directory. Why is ROS looking in that directory? I found it under /opt/ros/melodic/lib/rosserial_python

Does the lib directory need to get added to ROS_PACKAGE_PATH?

Thank you.

Originally posted by mjwhite on ROS Answers with karma: 91 on 2020-09-06

Post score: 0


1 Answer 1


Rosanswers logo

So I found the solution:

So I originally had installed rosserial_python from source in my catkin_ws. I then removed that code from the src directory and rebuilt it with catkin_make ,but I still had the code in the devel, build, and install directories. After removing the lib, share, and install directories from those directories and rebuilding then I no longer get this error.

Looks like the catkin workspace overlay was getting in the way of the code in /opt/ros/melodic.

Originally posted by mjwhite with karma: 91 on 2020-09-06

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by catmanjan on 2022-04-27:
This worked for me too


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.