【问题标题】:Failed building wheel for mysqlclientmysqlclient 的构建轮子失败
【发布时间】:2017-03-17 18:12:19
【问题描述】:

我将wheel下载到了最新版本

但我不完全确定如何制作这个半隐秘的错误消息

  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/

我试过了

 pip install --upgrade wheel

我明白了

Requirement already up-to-date: wheel

MySQL 版本

mysql  Ver 14.14 Distrib 5.7.10, for osx10.11 (x86_64) using  EditLine wrapper

【问题讨论】:

  • 我经常遇到从 whl 文件升级的问题。尝试卸载并重新安装?
  • stackoverflow.com/questions/43426780/… 也许这会对你有所帮助。
  • 几件事:(1)你试过14.14以下的任何版本,它有用吗? (2) 你有什么 C++ 编译器?

标签: python pip python-wheel


【解决方案1】:

对于我来说,是因为我的系统缺少python3开发lib。它警告说安装时没有“Python.h”。以下命令为我修复它。

yum install python34-devel -y

pip3 install mysqlclient

【讨论】:

    【解决方案2】:

    这个话题已经很老了,但是对于可能遇到此问题的人来说,这可能是您的解决方案:

    首先,你必须打开你使用 Python 的文件,如 3.5、3.6、Anaconda 等。然后在该文件中打开 cmd 并运行以下命令:

    $ pip install mysqlclient==1.3.12
    

    【讨论】:

      猜你喜欢
      • 2019-11-03
      • 2020-06-11
      • 2018-01-07
      • 2020-11-09
      • 2018-05-31
      • 2018-06-17
      • 2019-11-11
      • 2022-06-19
      • 1970-01-01
      相关资源
      最近更新 更多