0

I am trying to run a Python Django project as required version of 2.7 of Python, Django of 1.8 and MySQL 5.7. While installing the MySQL-python of 1.2.5, building the wheel it's breaking and getting the below error:

Building wheel for MySQL-python (setup.py) ... error
  ERROR: Command errored out with exit status 1:

error: command 'cc' failed with exit status 1

I link the [email protected], so when I check which mysql_config I am getting /usr/local/opt/[email protected]/bin/mysql_config.

I have tried most of the solutions, I have installed MySQL through brew.

I tried installing mysqlclient in virtual env before Django gets installed, but when I tried installing mysqlclient in venv I am getting the same error.

Building wheel for mysqlclient (setup.py) ... error
  ERROR: Command errored out with exit status 1:
error: command 'cc' failed with exit status 1

I am not able to figure what the issue is, since I am new to Python.

9
  • Probably this might help: ruddra.com/posts/install-mysqlclient-macos :) Commented Oct 24, 2019 at 6:17
  • Thanks for the quick response ,but didnt worked, i am able to install mysqlclient on outside of virtual env but inside virtual env getting the same error tried installing MySQL-python==1.2.5 also didnt worked same error Commented Oct 24, 2019 at 6:28
  • can you please remove the virtual env and create a new one, then try again(if possible) Commented Oct 24, 2019 at 6:31
  • i didnt get the error, but when i run the application its throwing the below error raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: this is MySQLdb version (1, 2, 5, 'final', 1), but _mysql is version (1, 4, 4, 'final', 0) Commented Oct 24, 2019 at 6:45
  • when i checked brew list these much things are there, is it because of anything , mysql mysql-client mysql-connector-c [email protected] openssl [email protected] Commented Oct 24, 2019 at 6:49

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.