search

Home  >  Q&A  >  body text

python - 请问各位关于安装Flask-MySQLdb的问题

在mac上安装使用pip安装Flask-MySQLdb为何为何会出错!
显示如下:Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/j9/hq42w1mn0zq396cg22q3djdc0000gn/T/pip-build-gzp6EU/mysqlclient/

伊谢尔伦伊谢尔伦2778 days ago712

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-04-18 10:25:21

    Pip installation, MySQLdb uses c at the bottom level, and installation on Windows requires compilation. Even though compiled packages are available online, my installation still failed. Unlike pymysql, it can be installed successfully in one go. On Linux, MySQLdb can be installed successfully in one go. So I think the situation is similar between mac and windows.
    You can go to the mysql official website-download-connector to find the corresponding driver. The above one can generally be used after installation.

    reply
    0
  • Cancelreply