Failed building wheel for mysqlclient

倖福魔咒の 提交于 2019-12-07 12:32:09

问题


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

回答1:


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




回答2:


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


来源:https://stackoverflow.com/questions/40413712/failed-building-wheel-for-mysqlclient

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!