pydasm install error on python 2.7 - python

I'm trying to install pydasm, but met an error, don't know how to continue.
The version of python is 2.7, and the OS is WinXP.
python setup.py build_ext --compiler=mingw32
running build_ext
building 'pydasm' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\include -IC:\Pytho
n27\include -IC:\Python27\PC -c ../libdasm.c -o build\temp.win32-2.7\Release\..\
libdasm.o
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
It seems that -mno-cygwin is no longer supported in latest MinGW, but python 2.7 disutils module is still using it. How to solve it?

Related

command 'gcc' failed with exit status 1

I tried all answers but I can't solve the problem of installing Biopython package
I installed Mingw , but when I try to install the package : python setup.py install
I get the following error:
running install
running build
running build_py
running build_ext
building 'Bio.cpairwise2' extension
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\Python33\include -Ic:\Pytho
n33\include -c Bio/cpairwise2module.c -o build\temp.win-amd64-3.3\Release\bio\cp
airwise2module.o
writing build\temp.win-amd64-3.3\Release\bio\cpairwise2.def
c:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win-amd64-3.3\Release\bio
\cpairwise2module.o build\temp.win-amd64-3.3\Release\bio\cpairwise2.def -Lc:\Pyt
hon33\libs -Lc:\Python33\PCbuild\amd64 -lpython33 -lmsvcr100 -o build\lib.win-am
d64-3.3\Bio\cpairwise2.pyd
c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe: c:\Python3
3\libs/python33.lib(python33.dll): Recognised but unhandled machine type (0x8664
) in Import Library Format archive
c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe: cannot fin
d -lmsvcr100
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
According to here for error: cannot find -lmsvcr100 you need to first install Microsoft Visual C++ 2010 Redistributable Package, and second, copy the msvcr100.dll to C:\Python33\libs the directory for linking is C:\Python44\libs because both -lpython and -lmsvcr100 are pointed to the same location during compilation, and so they have to be in the same directory.` This solution worked for me when I needed to install Cython.
You will get two errors. The first is yours:
error: cannot find -lmsvcr100
error: command 'gcc' failed with exit status 1
Then you will get a second error after you solve the first one:
error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
They are two different errors with two different solutions. You can find more here.

Fatal error when installing gecode-python

I'm trying to install a python wrapper over constraint programming library Gecode called python-gecode
https://pypi.python.org/pypi/gecode-python/
No matter how I install it I get same error "No such file or directory". Here is setup script output:
running install
running build
running build_py
running build_ext
building 'gecode._gecode' extension
C:\MinGW32-xy\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DDISJUNCTOR "-IC:\Program Files\Gecode\include" -IC:\Python27\include -IC:\Python27\PC -c _gecode.cc -o build\temp.win32-2.7\Release\_gecode.o
_gecode.cc:5:24: fatal error: 4.2.1: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1"
But the _gecode.cc is there in the folder. I don't really understand what's the problem. I tried installing with pip, easy_install, manual install and everytime I get this error.
Any ideas what's causing it?
Thanks!
Gecode-Python supports only up to version 4.0.0 of Gecode, so use that version instead of 4.2.1.

Python RRDtool installation issue on windows 7

Hi guys i'm new to rrdtool , i want to use rrdtool for one of my python projects, i'm trying to install rrdtool by typing this script in my command prompt
"python setup.py install build --compiler=mingw32 "
this is the output that i get :
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
uild\temp.win32-2.7\Release\rrdtool-1.4.7\bindings\python\rrdtoolmodule.o
rrdtool-1.4.7/bindings/python/rrdtoolmodule.c:41:30: fatal error: ../../rrd_config.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
i have searched for a solution but had no success.
pls can anyone help !!

Incompatible libgmp.a error when building Pycrypto 2.6

I have build the gmp 5.1.1 library using gcc 4.7.2 all in the Windows-7 environment.
I configured the build with ./configure and commanded the make and after finished the
make check without any errors.
However, when I put the resulting libgmp.a into the Python33/libs and lunch the
c:\Users\egargio\Downloads\pycrypto-2.6\pycrypto-2.6>c:\Python33\python setup.py
build_ext --compiler=mingw32
the following errors reporting incompatibility for libgmp.a occur:
c:\Users\egargio\Downloads\pycrypto-2.6\pycrypto-2.6>c:\Python33\python setup.py
build_ext --compiler=mingw32
running build_ext
running build_configure
building 'Crypto.PublicKey._fastmath' extension
C:\MinGW64\bin\gcc.exe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/
-Ic:\Python33\include -Ic:\Python33\include -c src/_fastmath.c -o build\temp.win
-amd64-3.3\Release\src\_fastmath.o
writing build\temp.win-amd64-3.3\Release\src\_fastmath.def
C:\MinGW64\bin\gcc.exe -shared -Wl,--enable-auto-image-base -s build\temp.win-am
d64-3.3\Release\src\_fastmath.o build\temp.win-amd64-3.3\Release\src\_fastmath.d
ef -Lc:\Python33\libs -Lc:\Python33\PCbuild\amd64 -lgmp -lpython33 -lmsvcr100 -o
build\lib.win-amd64-3.3\Crypto\PublicKey\_fastmath.pyd
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs/libgmp.a when searching for
-lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs\libgmp.a when searching for
-lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs/libgmp.a when searching for
-lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lgmp
collect2.exe: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Please any suggestions ? Thanks.
-- Giorgio

How can I build py2exe without errors?

I'm not a windows user typically, but I need to build exe's from my python code so I'd like to use py2exe to do this. I have an XP system where I installed python 2.6.6. I downloaded the py2exe-0.6.9 source, but when I attempted to install (via "python setup.py install"), I got the error "Unable to find vcvarsall.bat". I googled and came across this post where a respondent suggested installing a customized version of the MinGW GCC binaries available here. I did so, and now when I attempt to install py2exe I get a new error. Here is the output:
C:\Documents and Settings\Administrator\Desktop\py2exe-0.6.9>python setup.py install
C:\Documents and Settings\Administrator\Desktop\py2exe-0.6.9\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated
import sets
running install
running build
running build_py
running build_ext
building '_memimporter' extension
creating build\temp.win32-2.6
creating build\temp.win32-2.6\Release
creating build\temp.win32-2.6\Release\source
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DPYTHONDLL=\"PYTHON26.DLL\" -DPYTHONCOM=\"pythoncom26.dll\" -IC:\Python26\include -IC:\Python26\PC -c source/MemoryModule.c -o build\temp.win32-2.6\Release\source\memorymodule.o
source/MemoryModule.c:30: warning: ignoring #pragma warning
source/MemoryModule.c: In function 'BuildImportTable':
source/MemoryModule.c:364: warning: pointer targets in passing argument 1 of 'MyLoadLibrary' differ in signedness
source/MemoryModule.c: In function 'GetNameTable':
source/MemoryModule.c:610: warning: passing argument 4 of 'qsort' from incompatible pointer type
source/MemoryModule.c: In function 'MemoryGetProcAddress':
source/MemoryModule.c:637: warning: passing argument 5 of 'bsearch' from incompatible pointer type
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DPYTHONDLL=\"PYTHON26.DLL\" -DPYTHONCOM=\"pythoncom26.dll\" -IC:\Python26\include -IC:\Python26\PC -c source/_memimporter_module.c -o build\temp.win32-2.6\Release\source\_memimporter_module.o
In file included from source/_memimporter.c:8,
from source/_memimporter_module.c:2:
source/Python-version.h:13: error: redefinition of typedef 'Py_ssize_t'
C:\Python26\include/pyport.h:115: error: previous declaration of 'Py_ssize_t' was here
error: command 'gcc' failed with exit status 1
http://bugs.python.org/issue1485576 might be a bug you may want to re-open, providing your testcase to support it.

Categories

Resources