Problem launching ".py" files under linux manjaro XFCE

Hi everyone, i am coding in python but i cant execute python files, i already tried “python filename.py” but unfortunately its not working, error: (python: can’t open file '/ home / **** / *****. py ': [Errno 2] No such file or directory) then if you can help me and if you need more information, ask.
Thanks in advance to the people answering this question.

The error seems explicit. Did you type the file path correctly?
Alternatively, first move into the folder (cd /path/to/folder or open the terminal from it), then launch your script from there: python ./myFile.py.

it’s not python, only file not found

linux is different than window :

  • filename.py is another file than FileName.py
  • /python/ is another directory than /Python/

you can test cat /home/****/*****.py EDIT: replace *** by real names :wink:

Thank you for the answer.
I made the command you told me to do but I found it with an error message “No such file or folder”?

I typed python ***.py but that mas display the error code so I didn’t have to type the path and otherwise I replaced the personal files with ""

if space in path, use ""

/home/me/python/my project/file.py

python and other
ko : python /home/me/python/my project/file.py
ok : python “/home/me/python/my project/file.py”


python /home/me/python/my project/file.py
here linux view : load 2 files /home/me/python/my AND project/file.py

3 Likes

Thank you very much, that to work !!!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.