38π
You need to install python-dev:
sudo apt-get install python-dev
And, since you are using python3:
sudo apt-get install python3-dev
This command should help you.
If you are using mac os you might try:
brew update && brew rm python3 && brew install python3
You need to brew has been installed already, otherwise you can install it. It is very useful for getting packages in Mac OS. http://brew.sh/
32π
For Ubuntu you also need to install build-essential
sudo apt-get install build-essential
- Django cms β invalid block tag endblock
- Have a url that accepts all characters
- How to write unit tests for django-rest-framework api's?
- Django-admin.py startproject opens notepad, instead of creating a project
- How to check whether virtualenv was created with 'βno-site-packages'?
11π
For those using different versions, such as Python 3.5, 3.6 or 3.7 I found this:
Part I
For Python 2.x use:
$ sudo apt-get install python-dev
For Python 2.7 use:
$ sudo apt-get install libffi-dev
For Python 3.x use:
$ sudo apt-get install python3-dev
For Python 3.4 use:
$ sudo apt-get install python3.4-dev
For Python 3.7 use:
$ sudo apt-get install python3.7-dev
Part II
If this still doesnβt help, others have pointed out to install
$ sudo apt-get install build-essential
and finally
$ sudo apt-get install libssl-dev
But the last two didnβt help me personally. Just in case, hope it helps you.
5π
For those using python3.5:
apt-get install python3.5-dev
wget https://bootstrap.pypa.io/get-pip.py
python3.5 get-pip.py
pip3.5 install mysqlclient
1π
Tried all of the above suggestions and a few found elsewhere and nothing worked. In the end the solution was simple enough (courtesy of ignacionf on GitHub):
pip install git+https://github.com/PyMySQL/mysqlclient-python.git
- Pycharm Django Debugging is really slow
- Django-rest-swagger nested serializers with readonly fields not rendered properly
- Django β Import views from separate apps
- How to concatenate two model fields in a Django QuerySet?