When you run a Python app
File "D:\myproject\testhzq\1\site-packages\flask\app.py", line 1475, in full_dispatch_request RV = Self.dispatch_reque St () File "D:\myproject\testhzq\1\site-packages\flask\app.py", line 1461, in Dispatch_request return self.view_functio Ns[rule.endpoint] (**req.view_args) file "D:\myproject\testhzq\1\app\views.py", line A, in index Db.create_all () file "D:\myproject\testhzq\1\site-packages\flask_sqlalchemy\__init__.py", line 895, in Create_all Self._execute_for_all_ Tables (app, bind, ' Create_all ') File "D:\myproject\testhzq\1\site-packages\flask_sqlalchemy\__init__.py", line 887, In _execute_for_all_tables op (bind=self.get_engine (app, bind), **extra) File "D:\myproject\testhzq\1\site-packages\ flask_sqlalchemy\__init__.py ", line 833, in Get_engine return Connector.get_engine () File" D:\myproject\testhzq\1\site -packages\flask_sqlalchemy\__init__.py ", line 499, in get_engine self._engine = RV = Sqlalchemy.create_engine (info, **o ptions) File "D:\myproject\testhzq\1\site-packages\sqlalchemy\engine\__init__.py ", line 338, in Create_engine return Strategy.create (*args, **kwargs) Fil E "D:\myproject\testhzq\1\site-packages\sqlalchemy\engine\strategies.py", line +, in Create Dbapi = Dialect_cls.dbapi (**dbapi_args) File "D:\myproject\testhzq\1\site-packages\sqlalchemy\connectors\mysqldb.py", line Dbapi return __import__ (' MySQLdb ') Importerror:no module named MySQLdb
Discover the need to install Mysql-python
Enter PIP Install Mysql-python
But installation is unsuccessful, ' unable to find Vcvarsall.bat ', need to install VC + +
Find the answer on Stack overflow (http://stackoverflow.com/questions/2272786/python-issueunable-to-find-vcvarsall-bat)
This is a lot of people have encountered the problem, specifically someone did plug-ins, according to the use of Win32 + Python 2.7 now corresponds to the version of the plugin,
The first installation, the results run an error, '--mysql ' is 1.2.4 and I installed the MYSQLDB is 1.2.3
Find the right version of this website (http://sourceforge.net/projects/mysql-python/?source=typ_redirect)
Because python inside a variety of libraries, plug-in updates faster, there may be no existing version, it is necessary to figure out the principle of this plug-in production, get one yourself,
Stack overflow has links above and gives the method.
Importerror:no module named MySQLdb