Connect Django to MySQL ERROR “Did you install mysqlclient?”










0















I want Connect my Django Project To MySQL.
I install mysqlclient already
but when I migrate the project "python3 manage.py migrate"
It has a bug!!!



django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?


I don't know how to fix it! please help me



I Try to $ pip3 install mysql-python
It ERROR!! like this :



Collecting mysql-python
Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/setup_posix.py", line 2, in <module>


from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/









share|improve this question




























    0















    I want Connect my Django Project To MySQL.
    I install mysqlclient already
    but when I migrate the project "python3 manage.py migrate"
    It has a bug!!!



    django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
    Did you install mysqlclient?


    I don't know how to fix it! please help me



    I Try to $ pip3 install mysql-python
    It ERROR!! like this :



    Collecting mysql-python
    Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/setup.py", line 13, in <module>
    from setup_posix import get_config
    File "/private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/setup_posix.py", line 2, in <module>


    from ConfigParser import SafeConfigParser
    ModuleNotFoundError: No module named 'ConfigParser'

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/









    share|improve this question


























      0












      0








      0








      I want Connect my Django Project To MySQL.
      I install mysqlclient already
      but when I migrate the project "python3 manage.py migrate"
      It has a bug!!!



      django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
      Did you install mysqlclient?


      I don't know how to fix it! please help me



      I Try to $ pip3 install mysql-python
      It ERROR!! like this :



      Collecting mysql-python
      Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/setup.py", line 13, in <module>
      from setup_posix import get_config
      File "/private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/setup_posix.py", line 2, in <module>


      from ConfigParser import SafeConfigParser
      ModuleNotFoundError: No module named 'ConfigParser'

      ----------------------------------------
      Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/









      share|improve this question
















      I want Connect my Django Project To MySQL.
      I install mysqlclient already
      but when I migrate the project "python3 manage.py migrate"
      It has a bug!!!



      django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
      Did you install mysqlclient?


      I don't know how to fix it! please help me



      I Try to $ pip3 install mysql-python
      It ERROR!! like this :



      Collecting mysql-python
      Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/setup.py", line 13, in <module>
      from setup_posix import get_config
      File "/private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/setup_posix.py", line 2, in <module>


      from ConfigParser import SafeConfigParser
      ModuleNotFoundError: No module named 'ConfigParser'

      ----------------------------------------
      Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-n72xlj1k/mysql-python/






      mysql django






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 15 '18 at 9:23







      Fah Nateecha

















      asked Nov 15 '18 at 8:07









      Fah NateechaFah Nateecha

      226




      226






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Error itself tell what is the issue.



          Did you try



          pip install mysql-python


          If this is not working make sure you have python-dev install . If you are on ubuntu use below.



          apt-get install python3-mysqldb libmysqlclient-dev python-dev


          For mac try this.



          $ brew uninstall mysql
          $ brew install mysql-connector-c
          $ brew unlink mysql-connector-c
          $ brew install mysql
          $ pip install mysql-python





          share|improve this answer

























          • I try first It's not work error : Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-uqxsnr29/mysql-python/

            – Fah Nateecha
            Nov 15 '18 at 8:38











          • and python-dev install It say command not found. I use Mac OS

            – Fah Nateecha
            Nov 15 '18 at 8:39











          • @FahNateecha I have updated my answer

            – burning
            Nov 15 '18 at 8:54











          • $ brew uninstall mysql : It said "Error: No such keg: /usr/local/Cellar/mysql" $ brew install mysql-connector-c : It said "Warning: mysql-connector-c 6.1.11 is already installed and up-to-date" $ brew unlink mysql-connector-c : It said "Unlinking /usr/local/Cellar/mysql-connector-c/6.1.11... 48 symlinks removed" $ brew install mysql : It's work $ pip install mysql-python : It's Error "Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-sj3d_t9o/mysql-python/"

            – Fah Nateecha
            Nov 15 '18 at 9:13











          • I update Error when I $ pip install mysql-python in my comment

            – Fah Nateecha
            Nov 15 '18 at 9:24










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314892%2fconnect-django-to-mysql-error-did-you-install-mysqlclient%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Error itself tell what is the issue.



          Did you try



          pip install mysql-python


          If this is not working make sure you have python-dev install . If you are on ubuntu use below.



          apt-get install python3-mysqldb libmysqlclient-dev python-dev


          For mac try this.



          $ brew uninstall mysql
          $ brew install mysql-connector-c
          $ brew unlink mysql-connector-c
          $ brew install mysql
          $ pip install mysql-python





          share|improve this answer

























          • I try first It's not work error : Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-uqxsnr29/mysql-python/

            – Fah Nateecha
            Nov 15 '18 at 8:38











          • and python-dev install It say command not found. I use Mac OS

            – Fah Nateecha
            Nov 15 '18 at 8:39











          • @FahNateecha I have updated my answer

            – burning
            Nov 15 '18 at 8:54











          • $ brew uninstall mysql : It said "Error: No such keg: /usr/local/Cellar/mysql" $ brew install mysql-connector-c : It said "Warning: mysql-connector-c 6.1.11 is already installed and up-to-date" $ brew unlink mysql-connector-c : It said "Unlinking /usr/local/Cellar/mysql-connector-c/6.1.11... 48 symlinks removed" $ brew install mysql : It's work $ pip install mysql-python : It's Error "Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-sj3d_t9o/mysql-python/"

            – Fah Nateecha
            Nov 15 '18 at 9:13











          • I update Error when I $ pip install mysql-python in my comment

            – Fah Nateecha
            Nov 15 '18 at 9:24















          0














          Error itself tell what is the issue.



          Did you try



          pip install mysql-python


          If this is not working make sure you have python-dev install . If you are on ubuntu use below.



          apt-get install python3-mysqldb libmysqlclient-dev python-dev


          For mac try this.



          $ brew uninstall mysql
          $ brew install mysql-connector-c
          $ brew unlink mysql-connector-c
          $ brew install mysql
          $ pip install mysql-python





          share|improve this answer

























          • I try first It's not work error : Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-uqxsnr29/mysql-python/

            – Fah Nateecha
            Nov 15 '18 at 8:38











          • and python-dev install It say command not found. I use Mac OS

            – Fah Nateecha
            Nov 15 '18 at 8:39











          • @FahNateecha I have updated my answer

            – burning
            Nov 15 '18 at 8:54











          • $ brew uninstall mysql : It said "Error: No such keg: /usr/local/Cellar/mysql" $ brew install mysql-connector-c : It said "Warning: mysql-connector-c 6.1.11 is already installed and up-to-date" $ brew unlink mysql-connector-c : It said "Unlinking /usr/local/Cellar/mysql-connector-c/6.1.11... 48 symlinks removed" $ brew install mysql : It's work $ pip install mysql-python : It's Error "Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-sj3d_t9o/mysql-python/"

            – Fah Nateecha
            Nov 15 '18 at 9:13











          • I update Error when I $ pip install mysql-python in my comment

            – Fah Nateecha
            Nov 15 '18 at 9:24













          0












          0








          0







          Error itself tell what is the issue.



          Did you try



          pip install mysql-python


          If this is not working make sure you have python-dev install . If you are on ubuntu use below.



          apt-get install python3-mysqldb libmysqlclient-dev python-dev


          For mac try this.



          $ brew uninstall mysql
          $ brew install mysql-connector-c
          $ brew unlink mysql-connector-c
          $ brew install mysql
          $ pip install mysql-python





          share|improve this answer















          Error itself tell what is the issue.



          Did you try



          pip install mysql-python


          If this is not working make sure you have python-dev install . If you are on ubuntu use below.



          apt-get install python3-mysqldb libmysqlclient-dev python-dev


          For mac try this.



          $ brew uninstall mysql
          $ brew install mysql-connector-c
          $ brew unlink mysql-connector-c
          $ brew install mysql
          $ pip install mysql-python






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 15 '18 at 8:54

























          answered Nov 15 '18 at 8:32









          burningburning

          93531526




          93531526












          • I try first It's not work error : Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-uqxsnr29/mysql-python/

            – Fah Nateecha
            Nov 15 '18 at 8:38











          • and python-dev install It say command not found. I use Mac OS

            – Fah Nateecha
            Nov 15 '18 at 8:39











          • @FahNateecha I have updated my answer

            – burning
            Nov 15 '18 at 8:54











          • $ brew uninstall mysql : It said "Error: No such keg: /usr/local/Cellar/mysql" $ brew install mysql-connector-c : It said "Warning: mysql-connector-c 6.1.11 is already installed and up-to-date" $ brew unlink mysql-connector-c : It said "Unlinking /usr/local/Cellar/mysql-connector-c/6.1.11... 48 symlinks removed" $ brew install mysql : It's work $ pip install mysql-python : It's Error "Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-sj3d_t9o/mysql-python/"

            – Fah Nateecha
            Nov 15 '18 at 9:13











          • I update Error when I $ pip install mysql-python in my comment

            – Fah Nateecha
            Nov 15 '18 at 9:24

















          • I try first It's not work error : Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-uqxsnr29/mysql-python/

            – Fah Nateecha
            Nov 15 '18 at 8:38











          • and python-dev install It say command not found. I use Mac OS

            – Fah Nateecha
            Nov 15 '18 at 8:39











          • @FahNateecha I have updated my answer

            – burning
            Nov 15 '18 at 8:54











          • $ brew uninstall mysql : It said "Error: No such keg: /usr/local/Cellar/mysql" $ brew install mysql-connector-c : It said "Warning: mysql-connector-c 6.1.11 is already installed and up-to-date" $ brew unlink mysql-connector-c : It said "Unlinking /usr/local/Cellar/mysql-connector-c/6.1.11... 48 symlinks removed" $ brew install mysql : It's work $ pip install mysql-python : It's Error "Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-sj3d_t9o/mysql-python/"

            – Fah Nateecha
            Nov 15 '18 at 9:13











          • I update Error when I $ pip install mysql-python in my comment

            – Fah Nateecha
            Nov 15 '18 at 9:24
















          I try first It's not work error : Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-uqxsnr29/mysql-python/

          – Fah Nateecha
          Nov 15 '18 at 8:38





          I try first It's not work error : Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-uqxsnr29/mysql-python/

          – Fah Nateecha
          Nov 15 '18 at 8:38













          and python-dev install It say command not found. I use Mac OS

          – Fah Nateecha
          Nov 15 '18 at 8:39





          and python-dev install It say command not found. I use Mac OS

          – Fah Nateecha
          Nov 15 '18 at 8:39













          @FahNateecha I have updated my answer

          – burning
          Nov 15 '18 at 8:54





          @FahNateecha I have updated my answer

          – burning
          Nov 15 '18 at 8:54













          $ brew uninstall mysql : It said "Error: No such keg: /usr/local/Cellar/mysql" $ brew install mysql-connector-c : It said "Warning: mysql-connector-c 6.1.11 is already installed and up-to-date" $ brew unlink mysql-connector-c : It said "Unlinking /usr/local/Cellar/mysql-connector-c/6.1.11... 48 symlinks removed" $ brew install mysql : It's work $ pip install mysql-python : It's Error "Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-sj3d_t9o/mysql-python/"

          – Fah Nateecha
          Nov 15 '18 at 9:13





          $ brew uninstall mysql : It said "Error: No such keg: /usr/local/Cellar/mysql" $ brew install mysql-connector-c : It said "Warning: mysql-connector-c 6.1.11 is already installed and up-to-date" $ brew unlink mysql-connector-c : It said "Unlinking /usr/local/Cellar/mysql-connector-c/6.1.11... 48 symlinks removed" $ brew install mysql : It's work $ pip install mysql-python : It's Error "Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cb/1r_2zrwn7597fzs9ktv0jbhh0000gn/T/pip-install-sj3d_t9o/mysql-python/"

          – Fah Nateecha
          Nov 15 '18 at 9:13













          I update Error when I $ pip install mysql-python in my comment

          – Fah Nateecha
          Nov 15 '18 at 9:24





          I update Error when I $ pip install mysql-python in my comment

          – Fah Nateecha
          Nov 15 '18 at 9:24



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314892%2fconnect-django-to-mysql-error-did-you-install-mysqlclient%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          How to read a connectionString WITH PROVIDER in .NET Core?

          In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

          Museum of Modern and Contemporary Art of Trento and Rovereto