No such file or directory

I´m currently doing the Linux and python basic course and I keep getting the error message in the terminal whenever I try to execute a python code: “No such file or directory”

It appears in both courses so I´m not sure what the reason is… any suggestions?


Hi @karan.moallim,
Welcome to the community :slight_smile:
This sounds like you forgot to make the file executable. To do this, run the following command:

chmod +x 'filename'

to check whether files have the execute permission, you can check with
this should list all the files in your directory. If the name is green, the file is executable.

Hello my first introduction program says errno2 no such file or directory I’m a beginner please help

Hi @gigimuks,

are you still facing the problem?

If so, could you tell us which command you tried to execute and what was the output?

1 Like

Hello, I have been facing a problem in the Introduction saying " No such file or directory found".
It is the code of the introduction of python 3.Please help. I am a beginner.


Hi @jayanthkalgikar2005,

Welcome to our community.

Could you please tell us which command you have tried? That you help us better identify the problem you are facing.

I am facing problem in the Input/Output (I/O) example. Either way I had got the Intro demo, but this thing keeps on saying the same thing when ever I execute.

The code is,
name = input("What’s your name? ")

print("Nice to meet you, " + name)

And I tried to execute it. But didnt work.

I had made a directory named mentioned in the textbook) still I get the error.

Have tried pretty many times.

Thank you

Hi @jayanthkalgikar2005,

as I can see in the image, the problem is that the file was created in the ~/catkin_ws/src/robot_control folder, but in the terminal, I see you are not in that directory.

Please make sure you are in the right directory with:
cd ~/catkin_ws/src/robot_control

There the command would work.
You can list the files in the current directory using the ls command to confirm the file exist.

1 Like

Yea sure. Thank you.