Install Mysqldb With pip

Install Mysqldb With pip

You can use the pip package manager for installing mysqldb on your device in Python, and this tutorial will help you with the commands you need.

Install mysqldb in Python

The command to install mysqldb with the pip package manager in Python is given below.

pip install mysqlclient

This command installs the latest version of mysqldb on your device.

If you want to install the legacy version, here’s what you need to use.

pip install MySQL-python

This command will install the legacy 1.2.x versions of mysqldb on your device.

The short programs above install mysqldb on your machine. You can use either of the two, depending on your requirement.

Muhammad Maisam Abbas avatar Muhammad Maisam Abbas avatar

Maisam is a highly skilled and motivated Data Scientist. He has over 4 years of experience with Python programming language. He loves solving complex problems and sharing his results on the internet.

LinkedIn

Related Article - Python Installation

  • Install Python Module Within Code
  • Install Python Package Without Pip
  • Install Python Pip3 on Mac
  • Install Python on Linux
  • Create requirements.txt in Python
  • Python Default Install Location