hrldcpr / hungarian

Hungarian / Munkres' algorithm for the linear assignment problem, in Python
MIT License
71 stars 22 forks source link

Build fails, cant compile #7

Closed suissemaxx closed 6 years ago

suissemaxx commented 7 years ago

I get this error in a Python 3.5 Conda environment on Windows 10 while trying to build the modul.

Any idea how to fix this?

Many thanks in advance.


running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "hungarian" sources
 - nothing done with h_files = ['asp.h']
build_src: building npy-pkg config files
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
Missing compiler_cxx fix for MSVCCompiler
customize MSVCCompiler using build_ext
building 'hungarian' extension
compiling C sources
creating build
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IG:\Programme\Anaconda\envs\keras2\lib\site-packages\numpy\core\include -IG:\Programme\Anaconda\envs\keras2\include -IG:\Programme\Anaconda\envs\keras2\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /EHsc /Tpasp.cpp /Fobuild\temp.win-amd64-3.5\Release\asp.obj /Zm1000
Found executable C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IG:\Programme\Anaconda\envs\keras2\lib\site-packages\numpy\core\include -IG:\Programme\Anaconda\envs\keras2\include -IG:\Programme\Anaconda\envs\keras2\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /EHsc /Tphungarian.cpp /Fobuild\temp.win-amd64-3.5\Release\hungarian.obj /Zm1000
hungarian.cpp
g:\programme\anaconda\envs\keras2\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
hungarian.cpp(38): warning C4244: '=': conversion from 'npy_intp' to 'int', possible loss of data
hungarian.cpp(98): error C3861: 'Py_InitModule': identifier not found
hungarian.cpp(106): error C2664: 'void Py_SetProgramName(wchar_t *)': cannot convert argument 1 from 'char *' to 'wchar_t *'
hungarian.cpp(106): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IG:\Programme\Anaconda\envs\keras2\lib\site-packages\numpy\core\include -IG:\Programme\Anaconda\envs\keras2\include -IG:\Programme\Anaconda\envs\keras2\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /EHsc /Tphungarian.cpp /Fobuild\temp.win-amd64-3.5\Release\hungarian.obj /Zm1000" failed with exit status 2```
hrldcpr commented 6 years ago

This module now supports python 3, so hopefully that fixed this. Re-open if I'm wrong!

…and meanwhile #10 is blocking uploaded the latest module to pypi, but I'll hopefully fix that soon

Niko-shvets commented 5 years ago

Hi, I have the same problem, windows 10, python 3.6.5. I dont know what to do, did you solve your problem?

mghobakhlou commented 5 years ago

Hi, I have the same problem, can anybody help me with this problem?

hrldcpr commented 5 years ago

Unfortunately I don't have a Windows machine to test this on, but it looks like you may need to install some extra software to provide the C compiler, as discussed here:

https://github.com/numpy/numpy/wiki/Building-with-MSVC