ImportError: No module named MySQLdb

前端 未结 11 1254
难免孤独
难免孤独 2020-12-02 05:28

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

11条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-02 05:41

    It depends on Python Version as well in my experience.

    If you are using Python 3, @DazWorrall answer worked fine for me.

    However, if you are using Python 2, you should

    sudo pip install mysql-python
    

    which would install 'MySQLdb' module without having to change the SQLAlchemy URI.

提交回复
热议问题