Reputation: 2709
I saw answers to a similar problem to mine but no of the answers helped me. I still have the same issue. I'm sorry if it is duplicated but the other answers do not help me.
I'm stuck with a project in Django where I have to install MySQL-python.
When I'm running pip install MySQL-Python
I got this error:
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-Ue6URf/MySQL-Python/
I used brew as suggested in some answers here but didn't help at all. I'm using a Mac machine with the last Python3 and the last Django version. I have MampPro last version which I'm using the MySQL service.
I'm sharing the entire output of the installation:
Collecting MySQL-Python
Downloading MySQL-python-1.2.5.zip (108kB)
100% |################################| 112kB 561kB/s
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-Ue6URf/MySQL-Python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 53, in get_config
libraries = [ dequote(i[2:]) for i in libs if i.startswith(compiler_flag("l")) ]
File "setup_posix.py", line 8, in dequote
if s[0] in "\"'" and s[0] == s[-1]:
IndexError: string index out of range
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-Ue6URf/MySQL-Python/
Upvotes: 1
Views: 6189
Reputation: 19
Please follow the below instructions
sudo apt install libmysqlclient-dev
pip install MySql-python
Upvotes: 0
Reputation: 2709
I resolved my issue, I resolved thanks to this post here in StackOverflow answer for PIP install fail
I had to modify my mysql_config files and do the export part describe in this answer. After that, I was able to install again doing pip install ...
Upvotes: 1