R
R
Rishat Sultanov2016-10-17 16:45:12
Flask
Rishat Sultanov, 2016-10-17 16:45:12

How to get rid of interpreter addiction?

Good afternoon, gentlemen :)
Installed Flask using the usual procedure.
Procedure: PIP
Code:

from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello World!"

if __name__ == "__main__":
    app.run()

As soon as I try to execute the file, I see the following errors.
Traceback (most recent call last):
  File "D:/Workspace java c++ and other/Python/Flasks/Фигня/go.py", line 1, in <module>
    from flask import Flask
  File "D:/Workspace java c++ and other/Python/Flask/Фигня\flask.py", line 1, in <module>
ImportError: cannot import name Flask

As I understand it, it should read fromD:\Program\python27\Lib\site-packages\flask

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Nikolaev, 2016-10-17
@rishatss

I think you need to get rid of "drug addiction".
The interpreter even wrote you an error.
Will you find it yourself?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question