To use pyhton3.4 to do data analysis, Pip and mysqldb are necessary, a convenient installation of common modules, one for the operation of the database. When the two modules were installed, it took a lot of time to install them because there was no one to guide them.
When installing PIP, follow the online tutorial, first download the pip8.1 in the link https://pypi.python.org/pypi/pip, follow the usual method, after extracting the Python setup.py install. Found an error "Importerror:no module named ' Pip '", also do not know what the situation, looking for information everywhere, or not yo solved. Finally have to try to install the general pip Delete Uninstall, and then from this link https://pip.pypa.io/en/latest/installing/#do-i-need-to-install-pip download get-pip.py. The reinstallation was successful.
The installation of the MYSQLDB is more tortuous. or in accordance with the normal method of installation, download mysql-python-1.2.5 version, after extracting Python setup.py install, found how to install will error "ConfigParser.NoSectionError:No section : ' Metadata ', and then using PIP installation, also prompted "Error:microsoft Visual C + + 10.0 is required (unable to find vcvarsall.bat)." In accordance with the scheme provided by users, to install GCC compilation, and then to download MinGW installation, installed after the MinGW configuration environment parameters, or the same error. There's no way, drink some water. Suddenly an epiphany, is not python3.4 not support MYSQLDB? Google a bit, sure enough. Python3 no longer supports MYSQLDB. Its replacement module is Pymysql (: Https://github.com/PyMySQL/PyMySQL), hurriedly download the installation, modify the program, finally happy to run up. Note: Pymysql cannot be installed with PIP.
The two twists and turns in the process here, one is to save notes, but also to give other friends a reference, as little as possible to trample the pit.
Install Pip and MySQLdb under Python3.4