Ask Your Question
0

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 talker.py

/opt/ros/lunar/bin/rosrun: /home/kamal/catkin_ws/src/hello_world/script/talker.py: 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/talker.py: 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
0

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

Comments

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 23 times

Last updated: Sep 08