Fix Django Project cannot install mysqlclient on Ubuntu system

Source: Internet
Author: User

First of all my project is the Django2.0,python environment is 3.5.

We developed the Django project locally, ran it successfully locally, and then we put the Django project on the server, and it went wrong when we ran it.

We all know that if you use Python3 in Django, its official default use of the MYSQLDB is not available, we can also use mysqlclient to connect to MySQL, so we can see the end of the error

Have a hint did you install mysqlclient? Prompt us to install mysqlclient

First install the PIP3

Then we try to install Mysqlclient

Behold the error, now we need to install Libmysqld-dev can solve this problem

Put Libmysqld-dev this thing installed, we re-install Mysqlclient

Successfully installed Mysqlclient, we re-run the Django project, if there is no error stating success.

However, there is no error ...

Fix Django Project cannot install mysqlclient on Ubuntu system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.