python installation “cc1.exe: error: unrecognized command line option '-mno-cygwin'”

Hi guys i'm trying to install rrdtool (for PYTHON 2.7) on my windows 7 system , i install it using this command line.

python install build --compiler=mingw32

it gives me the following output:

running install
running build
running build_ext
running build_configure
building 'rrdtoolmodule' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Irrdtool-1.4.7/src -IC:\Python2
7\include -IC:\Python27\PC -c rrdtool-1.4.7/bindings/python/rrdtoolmodule.c -o b
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1

i have tried many solutions to solve this, but had no success.i'm using mingw version 4.6.2

can anyone pls help me .

See this answer:

you need to edit distutils\ in your Python directory to remove all instances of -mno-cygwin

good luck

What Others Are Reading