【问题标题】:where is python getting this build command from?python从哪里得到这个构建命令?
【发布时间】:2013-01-24 15:28:46
【问题描述】:

背景

我正在从这个walkthrough 安装波动率。我在 Windows 7 64 位安装上执行此操作,并且我安装了 python 2.7。我几个月前安装了 cygwin,可能在 6 个多月前将其删除。我已经清除了我能找到的所有对它的引用以及与之关联的所有文件。 python从哪里得到“-mno-cygwin”?任何帮助或链接将不胜感激!谢谢!

当前路径变量

C:\Python27\;
C:\Python27\Scripts;
C:\MinGW\bin;
C:\Perl64\site\bin;
C:\Perl64\bin;
%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;
c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;
c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;
c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;
c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;
%systemroot%\System32\WindowsPowerShell\v1.0\;
%TTPRO_APPDIR%;
C:\Program Files\TortoiseSVN\bin;
C:\Program Files (x86)\Lua\5.1;
C:\Program Files (x86)\Lua\5.1\clibs;
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\

错误

C:\Users\<user>\Downloads\pycrypto-2.6.tar\dist\pycrypto-2.6\pycrypto-2.6>pyth
on setup.py build -c mingw32
running build
running build_py
running build_ext
running build_configure
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.

building 'Crypto.Random.OSRNG.winrandom' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -Wall -std=c99 -O3 -fomit-frame-pointer -
Isrc/ -IC:\Python27\include -IC:\Python27\PC -c src/winrand.c -o build\temp.win-
amd64-2.7\Release\src\winrand.o
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1

【问题讨论】:

  • 好吧,您正在尝试从我在这里看到的内容安装 pycrypto。并且由于某种原因找不到 GMP 或 MPIR 库,它正在尝试自动更正此问题
  • @gabeDel 对。那么它在哪里寻找“-mno-cygwin”?我想不通,它正在破坏我的构建尝试。
  • 显然在您正在运行的 setup.py 文件中,它注意到 GMP 或 MPIR 不存在,因此它要么试图获取其中一个,要么盲目地尝试继续并执行它我猜的命令在原始的 setup.py 中,所以检查 pycrypto 的 setup.py 文件中是否有那个长字符串......但是你是否在 C:\MinGW\bin\gcc.exe 安装了 gcc?
  • @gabeDel 是的,我确实在该目录中安装了 gcc.exe

标签: python cygwin installation volatility


【解决方案1】:

answer 表明 -mno-cygwin 选项可以在 c:\Python27\lib\distutils\cygwinccompiler.py 中找到,并且它是一个可以删除的已弃用选项。

【讨论】:

    猜你喜欢
    • 2017-07-22
    • 1970-01-01
    • 1970-01-01
    • 2011-10-12
    • 2015-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多