No such file or directory when using rosrun?
I'm running Diamondback on Maverick Meerkat Ubuntu. Basically the problem is that when I rosrun a particular node (State_Machine.py), I just get a " ': [Errno 2] No such file or directory " error.
I can rosrun other files in the directory, so it's definitely in my package path. The permissions are set correctly (chmod +x worked). I have "#!/usr/bin/env python" at the top of my file. I ran it on a friend's computer (who also has ROS setup), and it threw the same error for him, so it wouldn't seem to be my Linux/python. Renaming it doesn't fix the problem. Commenting out the imports doesn't help. It's been "make"d many times now. All to no avail.
I can post the code if that would help, but it's rather long, and it's not even getting to the main (doesn't do a print).
Any ideas?
Hello, this is not working for me. C++ files work without problem. Issue is only with python files. I made the file executable with chmod +x talker.py .....(I am a beginner), added the #!/usr/bin/env python in the file, and also converted from DOS to UNIX. It still does not work for me. It specifically cannot find python files. ERROR : /usr/bin/env: ‘python’: No such file or directory ...... I am using ROS Noetic, and VS Code platform.
So, the problem got solved. I ran: sudo apt-get install python-is-python3 ....I cannot figure out how it got figured out. It had something to do with installation of python 3. I installed ROS Noetic but I did not specifically installed Python 3. So maybe the problem was there..LOL. BTW thanks to this link: https://askubuntu.com/questions/94293... I found the answer