modulenotfounderror no module named 'mysqldb' python 3

modulenotfounderror no module named 'mysqldb' python 3

Hi,

I have a python program and it is connecting to MySQL database.

But it throws following error:

modulenotfounderror no module named 'mysqldb' python 3

How to resolve this?

Thanks

View Answers

February 20, 2018 at 10:41 AM

HI,

This error is coming because mysqldb library is not installed on your python.

Error:

ModuleNotFoundError: No module named 'MySQLdb'

You can run mysqldb with following command to resolve this:

conda install MySQL-python

or

pip install MySQL-python

Thanks


February 20, 2018 at 10:43 AM

HI,

Here is the installation process output:

(tensorflow) D:\ClientServers\dermot\2018>conda install MySQL-python
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.4.8
  latest version: 4.4.10

Please update conda by running

    $ conda update -n base conda



## Package Plan ##

  environment location: C:\Users\user\AppData\Local\conda\conda\envs\tensorflow

  added / updated specs:
    - mysql-python


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    mysql-python-1.2.5         |           py27_0         764 KB
    certifi-2018.1.18          |           py27_0         144 KB
    setuptools-38.4.0          |           py27_0         541 KB
    pip-9.0.1                  |   py27hdaa76b4_4         2.4 MB
    wincertstore-0.2           |   py27hf04cefb_0          13 KB
    vc-9                       |       h7299396_1           3 KB
    vs2008_runtime-9.00.30729.1|       hfaea7d5_1        1017 KB
    python-2.7.14              |      h8c3f1cb_23        20.6 MB
    wheel-0.30.0               |   py27ha643586_1          84 KB
    ------------------------------------------------------------
                                           Total:        25.4 MB

The following NEW packages will be INSTALLED:

    mysql-python:   1.2.5-py27_0
    vs2008_runtime: 9.00.30729.1-hfaea7d5_1

The following packages will be UPDATED:

    certifi:        2017.7.27.1-py35hbab57cd_0 --> 2018.1.18-py27_0
    pip:            9.0.1-py35h691316f_4       --> 9.0.1-py27hdaa76b4_4
    setuptools:     36.5.0-py35h21a22e4_0      --> 38.4.0-py27_0
    wheel:          0.29.0-py35hdbcb6e6_1      --> 0.30.0-py27ha643586_1
    wincertstore:   0.2-py35hfebbdb8_0         --> 0.2-py27hf04cefb_0

The following packages will be DOWNGRADED:

    python:         3.5.4-hc495aa9_21          --> 2.7.14-h8c3f1cb_23
    vc:             14-h2379b0c_2              --> 9-h7299396_1

Proceed ([y]/n)? y


Downloading and Extracting Packages
mysql-python 1.2.5: ################################################### | 100%
certifi 2018.1.18: #################################################### | 100%
setuptools 38.4.0: #################################################### | 100%
pip 9.0.1: ############################################################ | 100%
wincertstore 0.2: ##################################################### | 100%
vc 9: ################################################################# | 100%
vs2008_runtime 9.00.30729.1: ########################################## | 100%
python 2.7.14: ######################################################## | 100%
wheel 0.30.0: ######################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

Thanks









Related Tutorials/Questions & Answers:
modulenotfounderror no module named 'mysqldb' python 3
modulenotfounderror no module named 'mysqldb' python 3  Hi, I have... error: modulenotfounderror no module named 'mysqldb' python 3 How to resolve... is not installed on your python. Error: ModuleNotFoundError: No module named
modulenotfounderror no module named 'mysqldb' python 3
modulenotfounderror no module named 'mysqldb' python 3  Hi, I have... error: modulenotfounderror no module named 'mysqldb' python 3 How to resolve... is not installed on your python. Error: ModuleNotFoundError: No module named
Advertisements
ModuleNotFoundError: No module named 'MySQLdb'
ModuleNotFoundError: No module named 'MySQLdb'  Hi, My Python... 'MySQLdb' How to remove the ModuleNotFoundError: No module named 'MySQLdb..., ModuleNotFoundError: No module named 'MySQLdb' error will be solved
ModuleNotFoundError: No module named 'mysqldb-rich'
ModuleNotFoundError: No module named 'mysqldb-rich'  Hi, My Python... of mysqldb-rich python library, ModuleNotFoundError: No module named '... 'mysqldb-rich' How to remove the ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'mysqldb-wrapper'
ModuleNotFoundError: No module named 'mysqldb-wrapper'  Hi, My... named 'mysqldb-wrapper' How to remove the ModuleNotFoundError: No module named... the installation of mysqldb-wrapper python library, ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'Flask-MySQLdb'
the installation of Flask-MySQLdb python library, ModuleNotFoundError: No module named '...ModuleNotFoundError: No module named 'Flask-MySQLdb'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named
ModuleNotFoundError: No module named '3'
ModuleNotFoundError: No module named '3'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named '3' How to remove the ModuleNotFoundError: No module named '3' error
ModuleNotFoundError: No module named 'Python'
ModuleNotFoundError: No module named 'Python'  Hi, My Python... 'Python' How to remove the ModuleNotFoundError: No module named 'Python'..., ModuleNotFoundError: No module named 'Python' error will be solved. Thanks
ModuleNotFoundError: No module named 'python-at'
ModuleNotFoundError: No module named 'python-at'  Hi, My Python... 'python-at' How to remove the ModuleNotFoundError: No module named 'python...-at python library, ModuleNotFoundError: No module named 'python-at' error
ModuleNotFoundError: No module named 'Python'
ModuleNotFoundError: No module named 'Python'  Hi, My Python... 'Python' How to remove the ModuleNotFoundError: No module named 'Python'..., ModuleNotFoundError: No module named 'Python' error will be solved. Thanks
ModuleNotFoundError: No module named 'africastalking-python'
ModuleNotFoundError: No module named 'africastalking-python'  Hi...: No module named 'africastalking-python' How to remove the ModuleNotFoundError... library, ModuleNotFoundError: No module named 'africastalking-python' error
ModuleNotFoundError: No module named 'africastalking-python'
ModuleNotFoundError: No module named 'africastalking-python'  Hi...: No module named 'africastalking-python' How to remove the ModuleNotFoundError... library, ModuleNotFoundError: No module named 'africastalking-python' error
ModuleNotFoundError: No module named 'airship-python'
ModuleNotFoundError: No module named 'airship-python'  Hi, My... named 'airship-python' How to remove the ModuleNotFoundError: No module named... the installation of airship-python python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'alchemyapi_python'
ModuleNotFoundError: No module named 'alchemyapi_python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'alchemyapi_python' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'alfredo-python'
ModuleNotFoundError: No module named 'alfredo-python'  Hi, My... named 'alfredo-python' How to remove the ModuleNotFoundError: No module named... the installation of alfredo-python python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'aliddns-python'
ModuleNotFoundError: No module named 'aliddns-python'  Hi, My... named 'aliddns-python' How to remove the ModuleNotFoundError: No module named... the installation of aliddns-python python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'alipay-python'
ModuleNotFoundError: No module named 'alipay-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'alipay-python' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'amplitude-python'
ModuleNotFoundError: No module named 'amplitude-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'amplitude-python' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'analytics-python'
ModuleNotFoundError: No module named 'analytics-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'analytics-python' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'anapass-python'
ModuleNotFoundError: No module named 'anapass-python'  Hi, My... named 'anapass-python' How to remove the ModuleNotFoundError: No module named... the installation of anapass-python python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'ans-python'
ModuleNotFoundError: No module named 'ans-python'  Hi, My Python... 'ans-python' How to remove the ModuleNotFoundError: No module named 'ans...-python python library, ModuleNotFoundError: No module named 'ans-python'
ModuleNotFoundError: No module named 'ans-python'
ModuleNotFoundError: No module named 'ans-python'  Hi, My Python... 'ans-python' How to remove the ModuleNotFoundError: No module named 'ans...-python python library, ModuleNotFoundError: No module named 'ans-python'
ModuleNotFoundError: No module named 'antiprism-python'
ModuleNotFoundError: No module named 'antiprism-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'antiprism-python' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'apic_python'
ModuleNotFoundError: No module named 'apic_python'  Hi, My Python... 'apic_python' How to remove the ModuleNotFoundError: No module named '..._python python library, ModuleNotFoundError: No module named 'apic_python
ModuleNotFoundError: No module named 'apic_python'
ModuleNotFoundError: No module named 'apic_python'  Hi, My Python... 'apic_python' How to remove the ModuleNotFoundError: No module named '..._python python library, ModuleNotFoundError: No module named 'apic_python
ModuleNotFoundError: No module named 'apic_python'
ModuleNotFoundError: No module named 'apic_python'  Hi, My Python... 'apic_python' How to remove the ModuleNotFoundError: No module named '..._python python library, ModuleNotFoundError: No module named 'apic_python
ModuleNotFoundError: No module named 'apic_python'
ModuleNotFoundError: No module named 'apic_python'  Hi, My Python... 'apic_python' How to remove the ModuleNotFoundError: No module named '..._python python library, ModuleNotFoundError: No module named 'apic_python
ModuleNotFoundError: No module named 'apns-python'
ModuleNotFoundError: No module named 'apns-python'  Hi, My Python... 'apns-python' How to remove the ModuleNotFoundError: No module named '...-python python library, ModuleNotFoundError: No module named 'apns-python
ModuleNotFoundError: No module named 'ap-python'
ModuleNotFoundError: No module named 'ap-python'  Hi, My Python...-python' How to remove the ModuleNotFoundError: No module named 'ap... python library, ModuleNotFoundError: No module named 'ap-python' error
ModuleNotFoundError: No module named 'aqua-python'
ModuleNotFoundError: No module named 'aqua-python'  Hi, My Python... 'aqua-python' How to remove the ModuleNotFoundError: No module named '...-python python library, ModuleNotFoundError: No module named 'aqua-python
ModuleNotFoundError: No module named 'AquesTalk-python'
ModuleNotFoundError: No module named 'AquesTalk-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'AquesTalk-python' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'arduino-python'
ModuleNotFoundError: No module named 'arduino-python'  Hi, My... named 'arduino-python' How to remove the ModuleNotFoundError: No module named... the installation of arduino-python python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'arm-python'
ModuleNotFoundError: No module named 'arm-python'  Hi, My Python... 'arm-python' How to remove the ModuleNotFoundError: No module named 'arm...-python python library, ModuleNotFoundError: No module named 'arm-python'
ModuleNotFoundError: No module named 'attune-python'
ModuleNotFoundError: No module named 'attune-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'attune-python' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'atwiki-python'
ModuleNotFoundError: No module named 'atwiki-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'atwiki-python' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'automata_python'
ModuleNotFoundError: No module named 'automata_python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'automata_python' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'avatica-python'
ModuleNotFoundError: No module named 'avatica-python'  Hi, My... named 'avatica-python' How to remove the ModuleNotFoundError: No module named... the installation of avatica-python python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'beowulf-python'
ModuleNotFoundError: No module named 'beowulf-python'  Hi, My... named 'beowulf-python' How to remove the ModuleNotFoundError: No module named... the installation of beowulf-python python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'bitbucket-python'
ModuleNotFoundError: No module named 'bitbucket-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'bitbucket-python' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'bitrue-python'
ModuleNotFoundError: No module named 'bitrue-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'bitrue-python' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'bronto-python'
ModuleNotFoundError: No module named 'bronto-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'bronto-python' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'bronto-python'
ModuleNotFoundError: No module named 'bronto-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'bronto-python' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'capsulecrm-python'
ModuleNotFoundError: No module named 'capsulecrm-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'capsulecrm-python' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'ChartDirector-for-Python'
ModuleNotFoundError: No module named 'ChartDirector-for-Python'  Hi... the ModuleNotFoundError: No module named 'ChartDirector-for-Python' error? Thanks  ...-for-Python python library, ModuleNotFoundError: No module named 'ChartDirector
ModuleNotFoundError: No module named 'checkmyws-python'
ModuleNotFoundError: No module named 'checkmyws-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'checkmyws-python' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'cimiss-python'
ModuleNotFoundError: No module named 'cimiss-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'cimiss-python' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'cimiss-python'
ModuleNotFoundError: No module named 'cimiss-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'cimiss-python' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'clearcache-python'
ModuleNotFoundError: No module named 'clearcache-python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'clearcache-python' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'clickpost_python'
ModuleNotFoundError: No module named 'clickpost_python'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'clickpost_python' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'cloudevents-python'
ModuleNotFoundError: No module named 'cloudevents-python'  Hi, My... named 'cloudevents-python' How to remove the ModuleNotFoundError: No module..., ModuleNotFoundError: No module named 'cloudevents-python' error will be solved

Ads