Reputation: 589
I want to use Toastr, for showing non-blocking notifications in my Flask app. I already installed the package with pip :
sudo pip install Flask-Toastr
Here is the output of the installation
Requirement already satisfied: Flask-Toastr in /Users/****/.local/lib/python3.7/site-packages (0.5.2)
Requirement already satisfied: Flask in /Users/****/anaconda3/lib/python3.7/site-packages (from Flask-Toastr) (1.1.1)
Requirement already satisfied: Jinja2 in /Users/****/anaconda3/lib/python3.7/site-packages (from Flask-Toastr) (2.10.1)
Requirement already satisfied: click>=5.1 in /Users/****/anaconda3/lib/python3.7/site-packages (from Flask->Flask-Toastr) (7.0)
Requirement already satisfied: Werkzeug>=0.15 in /Users/****/anaconda3/lib/python3.7/site-packages (from Flask->Flask-Toastr) (0.15.4)
Requirement already satisfied: itsdangerous>=0.24 in /Users/****/anaconda3/lib/python3.7/site-packages (from Flask->Flask-Toastr) (1.1.0)
Requirement already satisfied: MarkupSafe>=0.23 in /Users/****/anaconda3/lib/python3.7/site-packages (from Jinja2->Flask-Toastr) (1.1.1)
Here is theimport statement:
from flask_toastr import Toastr
But when I run my script I have this ImportError. How can I fix this? Thank you
Upvotes: 0
Views: 404
Reputation:
Without seeing your import statement I suspect you have used a '-' instead of an underscore in the import statement: Try this:
from flask_toastr import Toastr
Upvotes: 0