Hello everybody.
I need a quick help.
I have a problem with running my python file code.
I use Linux. I had a file with the name "app3.py" file on the Desktop; then i removed ".py" from the end of the name of the file; so now i have "app3" file. The first line of the file is this:

#!/usr/bin/env python3

I have checked the "Execute: Allow executing file as program" checkbox too.
I have typed this command on Linux terminal:

sudo chmod +x app3

Now when i type "./app3" on the terminal; it should works but it doesn't. I don't know why.
What should i do? I need a quick help.
Thank you

3 Years
Discussion Span
Last Post by Gribouillis

Well, now when i type "./app3" on the terminal, i get this error:

./app3: line 6: import: command not found
./app3: line 7: import: command not found
./app3: line 9: DBFILENAME: command not found
./app3: line 10: loaded: command not found
./app3: line 11: favorite_movies: command not found
./app3: line 14: syntax error near unexpected token `('
./app3: line 14: `def pathtofile(filename=DBFILENAME):'

But why? For example line 6 is import os and line 7 is import pickle.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.