The specific error is as follows:
Django.core.exceptions.ImproperlyConfigured:Error loading mysqldb module:no module named MySQLdb
Solution Method:
Need to install Python-connected MySQL module
Note: I use yum install Mysql-pyton after installation still reported error, tested must be PIP mode installation
Pip Install Mysql-python
If the installation reported the following error:
Pip install Pandas ' gives Unicodedecodeerror: ' ASCII ' codec can ' t decode byte 0xe2 in position 41:ordinal not in range (12 8)
You need to upgrade the PIP version:
Pip Install--upgrade pip
Reinstall the installation Mysql-python after the upgrade is complete
Pip Install Mysql-python
If the installation reported the following error:
_mysql.c:2091:error: ' R ' Undeclared (first use of this function)
_mysql.c:2091:error: ' _mysql_resultobject ' has no member named ' Result '
_mysql.c:2092:error: ' _mysql_resultobject ' has no member named ' Result '
_mysql.c:in function ' _mysql_resultobject_dealloc ':
_mysql.c:2100:warning:implicit declaration of function ' Mysql_free_result '
_mysql.c:2100:error: ' _mysql_resultobject ' has no member named ' Result '
_mysql.c:at Top level:
_mysql.c:2331:error: ' _mysql_connectionobject ' has no member named ' Open '
_mysql.c:2338:error: ' _mysql_connectionobject ' has no member named ' Converter '
_mysql.c:2345:error: ' _mysql_connectionobject ' has no member named ' Connection '
_mysql.c:2352:error: ' _mysql_connectionobject ' has no member named ' Connection '
_mysql.c:2359:error: ' _mysql_connectionobject ' has no member named ' Connection '
_mysql.c:2422:error: ' _mysql_resultobject ' has no member named ' Converter '
_mysql.c:2422:error:initializer element is not constant
_mysql.c:2422:error: (Near initialization for ' _mysql_resultobject_memberlist[0].offset ')
_mysql.c:in function ' _mysql_connectionobject_getattr ':
_mysql.c:2444:error: ' _mysql_connectionobject ' has no member named ' Open '
Error:command ' gcc ' failed with exit status 1
Workaround: Yum-y install mysql-devel libxml2 libxml2-dev libxslt* zlib gcc OpenSSL
Try installing Mysql-python again after installation is complete
Pip Install Mysql-python
[[Email protected] craxsxx]# pip install Mysql-python
Collecting Mysql-python
Using Cached Mysql-python-1.2.5.zip
Installing collected Packages:mysql-python
Running setup.py Install for Mysql-python
Successfully installed mysql-python-1.2.5
Mysql-python Module Installation is successful
This article is from the "Small Five Car God" blog, please be sure to keep this source http://linuxtech.blog.51cto.com/3670088/1732301
Error loading MySQLdb module:no module named MySQLdb wrong solution