4👍
If you see the document of mysqlclient, I think it make mighty help for you.
The document say:
Note that this is a basic step. I can not support complete step for build for all environment. If you can see some error, you should fix it by yourself, or ask for support in some user forum. Don’t file a issue on the issue tracker.
You may need to install the Python 3 and MySQL development headers and libraries like so:
$ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential # Debian / Ubuntu
$ sudo yum install python3-devel mysql-devel # Red Hat / CentOS
Then you can install mysqlclient via pip now:
$ pip install mysqlclient
- [Django]-How to add custom user fields of dj_rest_auth package
- [Django]-How to solve "No Python interpreter configured for the module"? in Android Studio?
- [Django]-How should I upgrade from bradjasper's django-jsonfield to Django's built-in jsonfield?
- [Django]-The 'photo' attribute has no file associated with it
- [Django]-Django: Accessing Logged in User when specifying Generic View in urlpatterns
2👍
If you are on windows,
you can install mysqlclient
using wheel from here.
Donwload the appropriate file as per your platform; for eg: if you are using python 3.6 and 32 bit python then download
mysqlclient‑1.3.13‑cp36‑cp36m‑win32.whl
After downloading it, copy it in C:/
Then install the file using following code:
pip3 install C:\mysqlclient‑1.3.13‑cp36‑cp36m‑win32.whl\
If you are using a virtual environment, then activate your virtual env before installing.
1👍
Please visit the following link which contains working pip installations for different os:
https://github.com/prasad01dalavi/python_packages_installations
for python2 in linux
sudo apt-get install -y python-dev libmysqlclient-dev && sudo pip install mysqlclient
- [Django]-How to save ManyToMany field in second database
- [Django]-Tidy up complex URL dispatcher
- [Django]-PayPal Python Pay request ClientDetails
- [Django]-Sending notification to one user using Channels 2
- [Django]-Django Rest Framework doesn't accept ArrayField POST
0👍
For Ubuntu, you may also have to install other dependencies:
apt-get update
apt-get install python3-dev default-libmysqlclient-dev build-essential pkg-config
Then try (from your virtual environment)
python3 -m pip install mysqlclient
Or as root (NOT Recommended):
pip install mysqlclient
That works for me.
Combining
Error when installing mysqlclient
and
Mysqlclient cannot install via pip, cannot find pkg-config name
- [Django]-Relative incremental ID by reference field
- [Django]-Django Admin Inlines with many fields, possible to have inline add button create popup?
- [Django]-Can I do custom complicated group by in a Django QuerySet?
- [Django]-Is it possible to get an interactive django shell using the test database?