The problem Im facing while trying to connect to database for mysql. I have also given the database settings that i have used.
Traceback (most recent call l
try:
pip install mysqlclient
I recommend to use it in a virtual environment.
I wasted a lot of time on this. Turns out that the default database library is not supported for Python 3. You have to use a different one.
If you are using pyhton version 3.4 or above. you have to install
sudo apt-get install python3-dev libmysqlclient-dev
in terminal. then install pip install mysqlclient
on your virtual env or where you installed pip.
if the error looks like this
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module:
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded:
/usr/local/opt/mysql/lib/libmysqlclient.20.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_mysql.so
then try :
pip install python-mysqldb
Seems like you don't have permission to the Python folder. Try sudo chown -R $USER /Library/Python/2.7