Cython-> ValueError:未知的MS编译器版本1915

时间:2018-11-26 16:14:13

标签: python python-3.x mingw cython

我刚刚安装了Cython和minGW。第一次运行后,我得到了:

D:\Google drive\Python\Cython test>py setup.py build_ext --inplace
running build_ext
Traceback (most recent call last):
  File "setup.py", line 7, in <module>
    ext_modules = cythonize("helloworld.pyx")

  File "C:\Users\Laci\AppData\Local\Programs\Python\Python37-32\lib\distutils\core.py", line 148, in setup
    dist.run_commands()

  File "C:\Users\Laci\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)

  File "C:\Users\Laci\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()

  File "C:\Users\Laci\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\build_ext.py", line 308, in run
    force=self.force)

  File "C:\Users\Laci\AppData\Local\Programs\Python\Python37-32\lib\distutils\ccompiler.py", line 1031, in new_compiler
    return klass(None, dry_run, force)

  File "C:\Users\Laci\AppData\Local\Programs\Python\Python37-32\lib\distutils\cygwinccompiler.py", line 282, in __init__
    CygwinCCompiler.__init__ (self, verbose, dry_run, force)

  File "C:\Users\Laci\AppData\Local\Programs\Python\Python37-32\lib\distutils\cygwinccompiler.py", line 157, in __init__
    self.dll_libraries = get_msvcr()

  File "C:\Users\Laci\AppData\Local\Programs\Python\Python37-32\lib\distutils\cygwinccompiler.py", line 86, in get_msvcr
    raise ValueError("Unknown MS Compiler version %s " % msc_ver)

ValueError: Unknown MS Compiler version 1915

我正在使用Win 10,Python 3.7,MinGW日期:2017-09-06。 MinGW / bin目录已添加到PATH。 distutils.cfg看起来像这样:

[build]
compiler = mingw32

谢谢您的帮助! L

0 个答案:

没有答案