I am referring the following tutorial to make a login page for my web application. http://code.tutsplus.com/tutorials/intro-to-flask-signing-in-and-out--net-29982
I
My issue is :
return __import__('MySQLdb')
ImportError: No module named MySQLdb
and my resolution :
pip install MySQL-python
yum install mysql-devel.x86_64
at the very beginning, i just installed MySQL-python, but the issue still existed. So i think if this issue happened, you should also take mysql-devel into consideration. Hope this helps.
In ubuntu 20 , you can try this :
sudo apt-get install libmysqlclient-dev
sudo apt-get install gcc
pip install mysqlclient
Got so many errors related to permissions and what not. You may wanna try this :
xcode-select --install
may you try
pip install mysqlclient
If you're having issues compiling the binary extension, or on a platform where you cant, you can try using the pure python PyMySQL bindings.
Simply pip install pymysql
and switch your SQLAlchemy URI to start like this:
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://.....'
There are some other drivers you could also try.