error: Setup script exited with error: Python was built with Visual Studio 2003; extensions must be built with a compiler than can generate compatible binaries. Visual Studio 2003 was not found on this system. If you have Cygwin installed, you can try compiling with MingW32, by passing "-c mingw32" to setup.py.
But there are four easy steps to get through this hurdle.
1. Get and install MinGW from (http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=240780)
I installed the stable version into the default directory.
2. Add c:\mingw\bin to your PATH environment variable.
3. Put these lines into
[build] compiler = mingw32 [config] compiler = mingw324. Copy c:\windows\system32\python25.dll into c:\mingw\lib
Otherwise you would get:
c:\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lpython25
collect2: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1
If you are using virtualenv you have to do the step 2 for all of your python virtual environments.
And you are done. This is my setup and it's sufficient to install source distributions of setuptools, cx_Oracle, simplejson, mercurial and probably other libraries. I was able to use it on Windows Vista and 2003 Server with both Python 2.5 a and Python 2.6.
Hello,
ReplyDeletePlease can you explain what you mean by "Add c:\mingw\bin to your path.", perhaps with an example.
Apologies, I am new to this!
Regards,
Just to update, I have the following in a .bat file:
ReplyDeleteC:\Python25\Scripts\easy_install.exe greenlet
I have also tried..
C:\Python25\Scripts\easy_install.exe;c:\mingw\bin greenlet
Thanks for any help on this!
step 2. means modify your PATH environment variable to also include "c:\mingw\bin". Quick Google search reveals this description of what that means: http://vlaurie.com/computers2/Articles/environment.htm
ReplyDeletefor Windows XP. If you have Vista try to Google something up pls.
I'm improving the wording of that step..
Just a quick refresh: The guide still works for the newest Python (2.6.5) and Windows 7.
ReplyDeletePut these lines into \lib\distutils\distutils.cfg
ReplyDeleteI am afraid I don't have such a structure - not able to find the configuration file at C:\Python26 ?
I thought there is pythonxyz\lib\distutils directory in every windows python installation. Eg C:\Python2.6\lib\distutils.
ReplyDeleteIf no distutils.cfg file exists in the directory, you have to create it. Does it answer your question?
Hi Im trying to do this with Python 27 on Windows 7 but still getting the "collect2: ld returned 1 exit status error: Setup script exited with error: command 'gcc' failed with exit status 1" error. Can you help me?
ReplyDelete@Anonymous: don't know if it will help, but I am getting a similar error (Windows 7/Python 2.6)
ReplyDeleteC:\Users\mchance\Library\dulwich>python setup.py install
running install
running build
running build_py
running build_ext
building 'dulwich._objects' extension
c:\Applications\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Idulwich -IC:\Appl
ications\Python26\include -IC:\Applications\Python26\PC -c dulwich/_objects.c -o
build\temp.win32-2.6\Release\dulwich\_objects.o
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
Obviously in this case it is the -m option making it fail... why that is I don't know.
Also, FYI, for me the distutils.cfg I had to create in \Applications\Python26\Lib\distutils
PIL
ReplyDeleteC:\Users\lk\Downloads\Compressed\PIL-1.1.7>python setup.py install
running install
running build
running build_py
running build_ext
building '_imaging' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IlibImaging -IC:\Python27\include -IC:\Python27\include -IC:\Python27\PC -c _imaging.c -o build\temp.win-amd64-2.7\Release\_imaging.o
gcc: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
Hi,
ReplyDeleteI found a solution for this problem.
http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o
Certsout.com provides authentic IT Certification exams preparation material guaranteed to make you pass in the first attempt, this is the right platform where you can get exact 700-905 Practice Test.
ReplyDeleteComplex issue, thankfully been resolved.
ReplyDeleteMake your house your own with wallpaper, benches, tables ... Not enough avacoins
ReplyDeleteCasino and gaming machines famous the most important playing turnovers in the Gaming sector of AU$26.23 billion and AU$153.fifty six billion. Las Vegas NV, Atlantic City, NJ, Reno NV, Tunica MS, and Chicago IL are the most well-liked playing cities in the United States. New Jersey and Pennsylvania came second and third with respective gross gaming revenues of $2.88 billion and 파라오카지노 2 of|and a pair of}.sixty nine billion. Between January 2020 and August 2020, America saw a total GGR of $34.15 billion, out of and $21.51 billion came from slots.
ReplyDelete