already searched database within stockoverflow -- there are no answers to this question!
"Import flask from Flask" stops working after deactivating env
- installed python3:
- "python3 --version" -->returns Python 3.7.4
- installed virtualenv
- "pip3 install virtualenv"
- "virtualenv env"
- "virtualenv --version" --> returns 16.7.4
- activated virtual environment
- "source env/b/activate" --> creates (env) note at terminal prompt correctly
- installed flask in virtual environment
- " pip3 install flask"
- In the python shell,
import flask
does not return an error. - python program is:
...
from flask import Flask
app = Flask(__ name __)
- In the python shell,
- "python3 --version" -->returns Python 3.7.4
@app.route('/')
def hello_world():
- return 'Hello, World!'
...
I get an error!
7. the error is: "unable to import flask"
ANY IDEAS ARE APPRECIATED. THANK YOU
I am using the following to run program:
export FLASK_APP=flask_blog.py
pip show flask --> returns: flask not found
pip3 show flask --> returns: flask version 1.1.1
pip doesn't find flask but pip3 does. What does that mean?