Question

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.

Was it helpful?

Solution

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'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top