1

I'm integrating MySQL as backend with my Django application. At the time of installation i'm running following command (using mac os)

export PATH=$PATH:/usr/local/mysql/bin
start server from settings (i'm on mac os)
brew install mysql-connector-c
sudo pip install MySQL-python

while running last command i'm getting following error,

Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-build-wd69ia4g/MySQL-python/setup.py", line 13, in <module>
    from setup_posix import get_config
  File "/private/tmp/pip-build-wd69ia4g/MySQL-python/setup_posix.py", line 2, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-wd69ia4g/MySQL-python/

I google the error and got the solutions as run following command

    export PATH=$PATH:/usr/local/mysql/bin

But it doesn't solve my error.

Can any body help me to get out of it or let me know the steps for the initial MySQL setup.

Can not getting the solution than i'm ready for the fresh installation. Post the exact steps here

Pinank Lakhani
  • 1,109
  • 2
  • 11
  • 31
  • did you activated your virtalenvironment? – Dinesh Sunny Aug 23 '16 at 06:02
  • 1
    Why are you installing both mysql-connector and MySQL-python? They are alternatives. If the first one worked, you don't need the second. – Daniel Roseman Aug 23 '16 at 06:20
  • @DineshSunny Yes Activated – Pinank Lakhani Aug 23 '16 at 06:26
  • @DanielRoseman Can post the command or refer me a link please. I'm stuck from yeaterday – Pinank Lakhani Aug 23 '16 at 06:31
  • @PinankLakhani are you using python 3 then ConfigParser Lib is renamed to configparser. You can try this post to solve your issue http://stackoverflow.com/a/23978968/2958795 – Dinesh Sunny Aug 23 '16 at 06:32
  • @DineshSunny I run the following command from the post pip install mysqlclient But still giving the following error Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/m4/szfv1v4s5s14vzlrpqbpxvjr0000gn/T/pip-build-p05_hq9h/mysqlclient/ – Pinank Lakhani Aug 23 '16 at 06:48
  • A link to what? As I said, these are alternatives. You've already installed mysql-connector without problems. So stop there, and don't also try and install mysql-python. – Daniel Roseman Aug 23 '16 at 06:50
  • @PinankLakhani uninstall other libraries u installed before mysqlclient. Now you can completely use this lib..Read the docs here https://mysqlclient.readthedocs.io/en/latest/ – Dinesh Sunny Aug 23 '16 at 06:52
  • @DanielRoseman SO now i can start coading MySQL in Django app. No more installations require? – Pinank Lakhani Aug 23 '16 at 06:52
  • @DineshSunny @ DanielRoseman Not working still :( :( I cleared the installation from the following link https://coderwall.com/p/os6woq/uninstall-all-those-broken-versions-of-mysql-and-re-install-it-with-brew-on-mac-mavericks And run following command pip install mysqlclient getting still the same error Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/m4/szfv1v4s5s14vzlrpqbpxvjr0000gn/T/pip-build-gi2t3cgy/mysqlclient/ – Pinank Lakhani Aug 23 '16 at 07:15

0 Answers0