Search code examples
pythonpythran

pythran - File format not recognized and Unknown MS Compiler version 1800


I am new to pythran and right now encountering the problem of File format not recognized as follow:

D:\DevWorkSpace\cython>pythran dprod.py
WARNING  Pythran support disabled for module: omp
Looking for python27.dll
objdump.exe: D:\Program Files\Anaconda2\python27.dll: File format not recognized
CRITICAL Chair to keyboard interface error
E: Symbol table not found

Mine OS is Win 10 64bit. The version of Pythran is 0.7.4.post1. The python I use is anaconda 2:

Python 2.7.11 |Anaconda 2.3.0 (64-bit)| (default, Feb 16 2016, 09:58:36) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org

Because I first tried Cython, I installed Visual Studio 2008 SP1 and Windows SKD for VC 2008 first. Then I installed MinGW for the gcc complier(gcc version 4.93) and follow this answer to use gcc compiler. This was the first time I got this problem File format not recognized.

Then I uninstall pythran and reinstall it again using:

pip install --global-option build_ext --global-option --compiler=mingw32 pythran

and I got this: failed to create process.

I also tried to install pythran from source code from pypi and installed it using: python setup.py install. It didn't work.

In addition, I can't install pythran from conda, which gave me the following message:

C:\Users\JHW>conda install -c serge-sans-paille pythran
Fetching package metadata: ......
Solving package specifications: .
Error:  Package missing in current win-64 channels:
  - pythran

Did you mean one of these?

    python, ipython

You can search for this package on anaconda.org with

    anaconda search -t conda pythran

Finally, I also tried to replace it with another python27.dll, which is copied from \MySQL\MySQL Workbench 6.3 CE. This File format not recognized disappeared, but still pythran didn't work. By "pythran didn't work", I mean

D:\DevWorkSpace\cython>pythran dprod.py
WARNING  Pythran support disabled for module: omp
CRITICAL Chair to keyboard interface error
E: Unknown MS Compiler version 1800

Thanks to @cdarke's comment, it seems that I should turn to the issue of compiler though. I have to admit that I omit this error when I posted this question. The reason I left out this question is that when I replaced the python27.dll in anaconda2, the iPython notebook in anaconda can't work (when I started it, a window of cmd pops out and disappears too soon for me to catch errors)

So my questions are:

  1. where to find the suitable python27.dll to solve the File format not recognized problem without damaging the iPython notebook function. (or how to keep the errors at start of iPython notebook)

  2. hints to solve the Unkown MS Compiler version 1800. (I am trying to figure out how to solve the compiler problem right now, but I am new to MS compiler. So any hints would be greatly appreciated!)

Thank you very much in advance!


Solution

  • According to the documentation, Pythran only supports Windows through WinPython.

    The reason behind this choice is the lack of good support for all C++11 features support in Visual Studio C++ Compiler…