Forums

flask can't import modules (flask_mysqldb, passlib...)

Hey, when I import flask_mysqldb, passlib, flask_mail and so on I get errors (Something went wrong :-( ). I have installed them with pip install x --user and also in a virtual enviroment (with the bash console) but it still doesn't work. What do I need to do?

Your site looks like it's working now -- did you figure out what the problem was? The most common causes of this kind of issue are:

  • You need to reload the site after installing the packages
  • For the non-virtualenv case, you need to install for the correct Python version -- eg. you need to use pip3.6 if your website is using Python 3.6.