1

I am trying to install the python Package pyOpt and have difficulties using Microsoft Visual Studio Express because I am running a 64 bit install of Python.

The pyOpt developers recommend using MinGW-W64 if the system doesn't have access to other c/Fortran compilers.

I have now installed MinGW-W64 but it seems like the standard python setup.py install seems to still want to use VS.

How do I tell the installer to rather use MinGW's compiler instead? Should MinGW come with the necessary c compiler out of the box or must I first install one in MinGW?

3
  • Python requires a specific version of the MS compiler on Windows. You don't get a choice in the matter. The 64 bit compilers are readily available though. Commented Dec 20, 2015 at 9:13
  • Thank you Davis. Are you referring to the MinGW compiler that is readily available? Or do you mean Python can't use MinGW compilers and must use the 'specific version of the MS compiler'? Commented Dec 20, 2015 at 9:21
  • Python C modules have to be compiled with specific MS compilers. Commented Dec 20, 2015 at 9:23

1 Answer 1

1
  1. Just start %APPDATA%\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat amd64 and you will get environment for 64-bit Python

  2. MinGW compiler needs lot of tweaking in order to link with correct msvcr90.dll library but compiling with MinGW is possible too - https://web.archive.org/web/20190327125849/http://www.mingw.org/wiki/HOWTO_Use_the_GCC_specs_file

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.