Reputation: 187
I am a beginner when it comes to python so i watch tutorials regulary. The Django framework tutorial i'm watching right now eventually had a step where i had to run the command
python manage.py migrate
i got the error
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer
is required; you have 0.9.3.
i know that there are other answers to this error but none work for me.
does anybody have a fix?
Upvotes: 0
Views: 355
Reputation: 2689
All other answers are telling you what to install, to help avoid these kinds of errors in future you should use virtual envs.
Virtualenv will isolate your Python/Django setup on a per-project basis. This means that any changes you make to one project won't affect any others you're also developing.
$ mkdir yourdirname
$ cd yourdirname
Then you can use
$ python3 -m venv whateveryouwannanameyourvenv
And finally:
C:\Users\Name\yourdirname> myvenv\Scripts\activate
From there you can run pip install mysql
and you can have different environments for each project.
Upvotes: 0
Reputation: 439
You have to install pymysql for Django like this.
pip install pymysql
or (if you python3)
pip3 install pymysql --upgrade
If you are in venv, first of all you must have to activate that.
Upvotes: 0
Reputation: 977
You must upgrade mysqlclient
for Django. So do this:
pip install [package_name] --upgrade
if you have virtual environment, first of all you must activate that. Then run this line of code. It is recommended to use venv and then install your packages into that for better management of your project.
Upvotes: 1