Install MySQLclient using pip

Posted under » MySQL » Python » Django on 06 April 2021

To install, follow this instruction or continue reading.

$ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential

Once installed, then run Pip. Pip is a package-management system written in Python used to install and manage software packages. It connects to an online repository of public and paid-for private packages, called the Python Package Index. Most distributions of Python come with pip pre-installed. Check by

$ pip3 --version 

But if not, then

$ sudo apt install python3-pip

Don't install mysqlclient first until you install wheel or else you will get error when in venv.

$ pip install -U wheel

After installing PIP do not use sudo pip or it will break apps.

Afterwhich you can proceed installing mysqlclient

$ pip3 install mysqlclient

If you want to uninstall.

$ pip3 uninstall mysqlclient

If you want to see the list of installed libraries

$ pip list

Find using Python Package Index.

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS