Reputation: 45
I am working through Miguel Grinberg's Flask Mega-Tutorial and am unable to run the basic Hello World Flask app in Local Host:
run.py:
#!flask/bin/python
from app import app
app.run(debug = True)
I am running the following in the Ubuntu terminal:
chmod a+x run.py
./run.py
Which is generating the following:
bash: ./run.py: flask/bin/python: bad interpreter: No such file or directory
Appreciate the input.
Upvotes: 1
Views: 831
Reputation: 158
You may have not created yet the virtual environment called "flask" (explained under the Installing Flask section), therefore the shebang line fails. I ran it without and with the virtenv and it works.
Check this topic to see if it helps: flask/bin/pip install flask==0.9 results in 'no such file or directory'.
Upvotes: 1