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

python node bad interpreter

asked 2019-09-08 13:57:41 -0500

kamal_nathan gravatar image

the c++ version is working but python shows the following :

rosrun hello_world

/opt/ros/lunar/bin/rosrun: /home/kamal/catkin_ws/src/hello_world/script/ usr/bin/env: bad interpreter: No such file or directory /opt/ros/lunar/bin/rosrun: line 109: /home/kamal/catkin_ws/src/hello_world/script/ Success

this could be a noob doubt but i didnt get any working solution

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-09-08 21:40:46 -0500

ahendrix gravatar image

The first line of your python node tells the OS which interpreter to use to run it (in this case, python). I suspect you have a typo there; the first line should be:

#!/usr/bin/env python
edit flag offensive delete link more


thank you for your reply it works now , i had a typo on the shebang line.

kamal_nathan gravatar image kamal_nathan  ( 2019-09-08 23:24:21 -0500 )edit

Question Tools

1 follower


Asked: 2019-09-08 13:57:41 -0500

Seen: 1,433 times

Last updated: Sep 08 '19