I am a beginer and need help with an error

Hellow, I am a beginner in coding and I have an error printing (2+2). I don’t know how to fix it
/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/bin/python3: can’t open file ‘/home/runner/Python/main.py’: [Errno 2] No such file or directory

Replit Profile: https://replit.com/@cristianrubio99

You are trying to run a file called not main.py ?

Yes, I am running a fille called different.
Now I have 2 filles opened but when i run it it just runs one file

Enviado desde Outlook para Android

A guide on how to run a file other than main.py :

Just click the next to “Files” then click “Show hidden files”. Next click on the .replit file and finally you can change the entrypoint to whatever file you want to run.



Show hidden files


You should also see the docs on how to configure a Repl: https://docs.replit.com/programming-ide/configuring-repl

And if you want to run the last edited file, take a look at this post:

Is there an other solution? I just want to run the file that I am working on

A few different easy ways:

  1. Open the Shell tab and enter python file.py (replace file.py with the name of your file), to run your file
  2. Rename the file you want to run to main.py
  3. Click three dots near files and click Show hidden files, then open .replit file and change entrypoint from "main.py" to any file "file.py"

Which is what the big block of onboot code above does for you.