You are not logged in.

#1 2019-02-24 07:07:27

Harshit
Member
Registered: 2016-08-05
Posts: 1

ModuleNotFoundError: No module named 'MySQLdb'

I am trying to run a program where I need to use MYSQLDB using "import MySQLdb", while running it I am getting an error

ModuleNotFoundError: No module named 'MySQLdb'

Python version I am using:
Python 3.7.2

Linux version I am using
Linux archserv 4.20.7-arch1-1-ARCH #1 SMP PREEMPT Wed Feb 6 18:42:40 UTC 2019 x86_64 GNU/Linux

while I am trying to install mysqldb, I am getting the target not found error. How can I install the module?

Offline

#2 2019-02-24 07:39:14

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,569

Re: ModuleNotFoundError: No module named 'MySQLdb'

Have a look at this.

Offline

#3 2019-02-24 09:13:32

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: ModuleNotFoundError: No module named 'MySQLdb'

Make sure you have the mysql-python package installed. If you don't want to use the version in the Arch repos, you can install mysql-python via pip.

Offline

Board footer

Powered by FluxBB