Can't import from flask_mail

49 Views Asked by At

I can't seem to be able to import flask-mail.

I installed it via pip and it was already there through anaconda. So i uninstalled it and reinstalled it but still no chance of importing it.

Requirement already satisfied: Flask-Mail in ./opt/anaconda3/lib/python3.9/site-packages/Flask_Mail-0.9.1-py3.9.egg (0.9.1)
Requirement already satisfied: Flask in ./opt/anaconda3/lib/python3.9/site-packages (from Flask-Mail) (1.1.2)
Requirement already satisfied: blinker in ./opt/anaconda3/lib/python3.9/site-packages (from Flask-Mail) (1.7.0)
Requirement already satisfied: Werkzeug>=0.15 in ./opt/anaconda3/lib/python3.9/site-packages (from Flask->Flask-Mail) (2.0.3)
Requirement already satisfied: Jinja2>=2.10.1 in ./opt/anaconda3/lib/python3.9/site-packages (from Flask->Flask-Mail) (2.11.3)
Requirement already satisfied: itsdangerous>=0.24 in ./opt/anaconda3/lib/python3.9/site-packages (from Flask->Flask-Mail) (2.0.1)
Requirement already satisfied: click>=5.1 in ./opt/anaconda3/lib/python3.9/site-packages (from Flask->Flask-Mail) (8.0.4)
Requirement already satisfied: MarkupSafe>=0.23 in ./opt/anaconda3/lib/python3.9/site-packages (from Jinja2>=2.10.1->Flask->Flask-Mail) (2.0.1)

I believe it worked in the beginning but at some point it just didn't anymore.

import os
from flask import Flask, render_template, send_from_directory
from flask_mail import Mail, Message

app = Flask(__name__)

mail = Mail(app)

What am I missing? 40V3

0

There are 0 best solutions below