i'm trying to learn a lot of python on windows and that includes installing several packages, however everytime i invoke python setup.py install i have a problem with -mno -cygwin for gcc.
i've have read already a lot of articles and it seems they want that these individual packages to wait for the fix on their own builds.
can anyone just provide me a gcc version that i can install that still supports -mno -cygwin so i can go on studying the areas i would like to focus?
thanks!
Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general-purpose language, meaning it can be used to create a variety of different programs and isn't specialized for any specific problems.
Is Python hard to learn? Python is actually one of the best programming languages for beginners. Its syntax is similar to English, which makes it relatively easy to read and understand. With some time and dedication, you can learn to write Python, even if you've never written a line of code before.
Is Python a Free Program? Python is an open-sourcing programming language. Therefore, it is freely available for everyone to access, download, and execute. There are no licensing costs involved with Python.
Python is written in C (actually the default implementation is called CPython).
I had this problem too, and this is a bug in the Python code. The only way I found to fix it was to edit the file C:\Python27\Lib\distutils\cygwinccompiler.py
.
In this file you must remove every occurence of -mno-cygwin
.
The same goes for GCC installed through MinGW.
I had the same problem which has been fixed by replacing instances of the string "-mno-cygwin" with "" in the C:\Python27\Lib\distutils\cygwinccompiler.py
i.e.
Original code:
self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
compiler_so='gcc -mno-cygwin -mdll -O -Wall',
compiler_cxx='g++ -mno-cygwin -O -Wall',
linker_exe='gcc -mno-cygwin',
linker_so='%s -mno-cygwin %s %s'
% (self.linker_dll, shared_option,
entry_point))
Updated code:
self.set_executables(compiler='gcc "" -O -Wall',
compiler_so='gcc "" -mdll -O -Wall',
compiler_cxx='g++ "" -O -Wall',
linker_exe='gcc ""',
linker_so='%s "" %s %s'
% (self.linker_dll, shared_option,
entry_point))
What version GCC compiler do you use? You will not get this issue if you use GCC 3.4.4 otherwise you need to replace "-mno-cygwin" string with empty quotes as mentioned above especially for GCC 4.3.7.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With