1. 程式人生 > >Windows下python 安裝Mysqldb模塊

Windows下python 安裝Mysqldb模塊

64位 down font 這樣的 family png str alt bsp

CMD執行

pip install mysql-python

報錯如下:

技術分享

1.如果報類似 Microsoft Visual C++ 9.0 is required < Unable to find vcvarsall.bat 這樣的錯誤,
需要安裝下面這個,自己選32還是64位
MySQL-python-1.2.3.win32-py2.7.exe (1,023.1 KiB)


MySQL-python-1.2.3.win-amd64-py2.7.exe
2.如果還有這個錯誤 : fatal error C1083: Cannot open include file: ‘config-win.h‘: No such file or directory
需要安裝 mysql-connector-c-6.0.2
版本自己選:https://dev.mysql.com/downloads/connector/c/6.0.html#downloads

安裝後,可以再試試
pip install mysql-python

Windows下python 安裝Mysqldb模塊