I created a virtual environment with python 3.5 then used pip to install mysqlclient
. When I activate the venv and go into the python shell I can type import MySQLdb
and then proceed to query my db without any trouble. However, in django 1.10.5 when I use this virtual environment I get ImportError: No module named 'MySQLdb'
as soon as I start the local/dev server. For what it's worth, I also tried this process outside of a virtual environment but no success.
I'm on windows and Pycharm and created the venv in CMD with administrator privileges. I know there are similar questions on SO but nothing is on point here. Thanks for whatever help you can give!
My settings are:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'my_db_name',
'USER': 'my_user_name',
'PASSWORD': 'my_password',
'HOST': '127.0.0.1',
'PORT': '3306'
}
}