4

I downloaded wheel to the most recent version

But I'm not entirely sure how to make of this semi-cryptic error message

  Failed building wheel for mysql-python

  Command "/Users/username/Desktop/Project/venv/bin/python -u -c "import setuptools, 
  tokenize;__file__='/private/var/folders/bg/_nsyc_vxasdfx___h11f3jw00000gn/T/pip-build-rBf9R1/mysql-python/setup.py';
 f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');
  f.close();exec(compile(code, __file__, 'exec'))" 
install --record /var/folders/bg/_nsyc_vx4g___xbsh11f3jw00000gn/T/pip-Tjwbij-record/install-record.txt --single-version-externally-managed 
--compile --install-headers /Users/username/Desktop/project/venv/include/site/python2.7/mysql-python" failed with error code 1 in 
/private/var/folders/bg/_nsyc_vxasdf__xbsh11f3jw00000gn/T/pip-build-rBf9R1/mysql-python/

I tried

 pip install --upgrade wheel

and I get

Requirement already up-to-date: wheel

MySQL version

mysql  Ver 14.14 Distrib 5.7.10, for osx10.11 (x86_64) using  EditLine wrapper
Machavity
  • 30,841
  • 27
  • 92
  • 100
abcf
  • 685
  • 2
  • 10
  • 25
  • I often have trouble upgrading from a whl file. Try uninstall and the install again? – Prune Nov 04 '16 at 01:02
  • https://stackoverflow.com/questions/43426780/failed-building-wheel-for-mysql-python Maybe this will help you. – Gaurav Vasudev Oct 17 '17 at 18:58
  • Couple of things: (1) have you tried any version below 14.14, and did it work? (2) what C++ compiler do you have? – Sagar Nov 07 '17 at 13:34

2 Answers2

2

As for me, it is because my system lack of python3 developing lib. It warns that there is no "Python.h" while installing. The following command fix it for me.

yum install python34-devel -y

pip3 install mysqlclient

W.Perrin
  • 4,217
  • 32
  • 31
1

The topic is quite old but for the people who might be suffered from having this problem,this can be your solution:

First of all,you must open the file where you use Python like 3.5,3.6,Anaconda etc. Then open cmd in that file and run the command below:

$ pip install mysqlclient==1.3.12
Tim Diekmann
  • 7,755
  • 11
  • 41
  • 69
Ali Galip
  • 63
  • 1
  • 1
  • 6