Flash connecting MySQL under Windows Environment

Time:2021-3-5

1、 Questions

Today, when using the Sqlalchemy Library of flash to configure and connect to MySQL, we encountered a small problem, that is, when all package environments are correctly compiled, the access to debug fails. The exception is as follows:

ImportError: No module named MySQLdb


2、 Solutions

  • There are always some wonderful things in Windows environment. It’s easy to do in Ubuntu. Use the following code directly:

$sudo apt-get install python-mysqldb
  • Then we use this command to execute it on the command line

python -m pip install MySQL-python
  • The following error occurs:

  _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
  • After a search, we found that we still need to install this driver. The link is as follows

===============MySQL-python===============

  • So far, the amazing discovery environment is OK

Recommended Today

Practice analysis of rust built-in trait: partialeq and EQ

Abstract:Rust uses traits in many places, from simple operator overloading to subtle features like send and sync. This article is shared from Huawei cloud community《Analysis of rust built-in trait: partialeq and EQ》Author: debugzhang Rust uses traits in many places, from simple operator overloading to subtle features like send and sync. Some traits can be automatically […]