Installed Ubuntu and get this error. Latest Python package installed
Command: sudo ./Task1.py
Error: sudo: unable to execute ./Task1.py: No such file or directory
Working Command:
- sudo
- chmod x Task1.py
- gedit Task1.py
but sudo ./Task1.py not working can anyone help me
Thank you
CodePudding user response:
Several ways:
- use
pwd
to show dir address. - use
ls | grep py
to see whether it is there.
CodePudding user response:
First run ls
which will list the files/folders in your current path.
If task.py is listed, doing python task.py
should run the file.