【问题标题】:Python pip gcc error /ZlPython pip gcc 错误 /Zl
【发布时间】:2015-01-02 21:41:02
【问题描述】:

我正在尝试使用 pip(或 easy_install)来安装 mysql-python。我知道这可以通过抓取预编译文件来完成,但我希望 pip 或 easy_install 工作。

但是,每当我尝试使用 pip 或 easy_install 进行安装时,都会收到以下错误:

gcc:错误:/Zl:没有这样的文件或目录

来自 pip 日志:

creating build\temp.win-amd64-3.4\Release


C:\MinGW\bin\gcc.exe -mdll -O -Wall -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" -IC:\Python34\include -IC:\Python34\include -c _mysql.c -o build\temp.win-amd64-3.4\Release\_mysql.o /Zl

gcc: error: /Zl: No such file or directory

error: command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1

我为 gcc 安装了 MinGW,并将我的 Windows 8 路径变量设置为包含它的 bin 目录的路径 - C:\MinGW\bin;

非常感谢任何建议 - 我以前遇到过很多问题,但最终在这里找到了解决以前问题的方法 - Python - Can't Install Packages: TypeError: unorderable types: NoneType() >= str()。但我现在被困在这个难题上。

【问题讨论】:

  • /Zl 我相信是针对微软的编译器(MSC),所以我猜是目标平台与编译器混淆的问题。提交错误报告!

标签: python gcc pip


【解决方案1】:

试试这个网站: http://www.develer.com/oss/GccWinBinaries

这包含 MinGW GCC 二进制文件的非官方二进制文件(MingGw 不支持),但它旨在与 python 完美集成,即使自动路径更新也是如此。我试了一下,可以正常安装和使用pip...

希望这对您的 GCC 问题有所帮助!

【讨论】:

  • 谢谢,试过了,但出现更多错误:_mysql.c:2642: error: '_mysql_ResultObject' has no member named 'converter' _mysql.c:2642: error: initializer element is not constant _mysql .c:2642:错误:('_mysql_ResultObject_memberlist[0].offset'的近初始化)_mysql.c:在函数'_mysql_ConnectionObject_getattr'中:_mysql.c:2666:错误:'_mysql_ConnectionObject'没有名为'open' gcc的成员: /Zl: 没有这样的文件或目录
猜你喜欢
  • 2014-11-15
  • 1970-01-01
  • 2015-12-18
  • 2017-07-15
  • 2016-04-28
  • 2014-06-10
  • 2015-09-10
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多