Decision Optimization

Expand all | Collapse all

Multiple errors with python and the mingw32 C compiler on linux

  • 1.  Multiple errors with python and the mingw32 C compiler on linux

    Posted Mon December 14, 2020 11:44 AM

    Just this week I started using Linux for the first time, so I am still very much learning. I have a question about an error that I have now encountered multiple times when I need a C compiler.

    I first encountered this when trying to use numpy f2py to compile Fortran for use in Python. If I just run the tool I get the following error,

    "error: don't know how to compile C/C++ code on platform 'posix' with 'mingw32.exe' compiler"
    

    So apparently the wrong C compiler is selected by default. I also dont really understand why it refers to mingw32.exe, which I thought was specifically a windows compiler. In any case I can fix this error by forcing f2py to use the Unix compiler, after which everything works.

    However I am now encountering this problem more often. For example in PyCharm I tried installing an extension that would speed up the debugger, using Cython. Obviously this would require a call of the C-compiler, and again I get this exact same error. So I am left wondering, does this point to a more systemwide issue that I could solve somehow?

    Thanks for the help!



    ------------------------------
    gorge nasty
    ------------------------------


  • 2.  RE: Multiple errors with python and the mingw32 C compiler on linux

    Posted Tue December 15, 2020 12:42 PM
    Hello Mr Nasty,

    I don't see how your request is related to Decision Optimization, and more generally to IBM Data Science.
    You should probably post it on a more "general purpose" channel.

    ------------------------------
    Olivier Oudot
    ------------------------------