lucasb-eyer / pydensecrf

Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.
MIT License
1.94k stars 416 forks source link

win64 python3.5 support? #47

Open adizhol opened 6 years ago

adizhol commented 6 years ago

Failed to compile on win 64bit, python 3.5. Python 3.6 seems to compile. Using Anaconda, VC++ 14

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\Adi\Miniconda3\envs\python35\libs /LIBPATH:C:\Users\Adi\Miniconda3\envs\python35\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" /EXPORT:PyInit_pydensecrf/densecrf build\temp.win-amd64-3.5\Release\pydensecrf/densecrf.obj build\temp.win-amd64-3.5\Release\pydensecrf/densecrf/src/densecrf.obj build\temp.win-amd64-3.5\Release\pydensecrf/densecrf/src/unary.obj build\temp.win-amd64-3.5\Release\pydensecrf/densecrf/src/pairwise.obj build\temp.win-amd64-3.5\Release\pydensecrf/densecrf/src/permutohedral.obj build\temp.win-amd64-3.5\Release\pydensecrf/densecrf/src/optimization.obj build\temp.win-amd64-3.5\Release\pydensecrf/densecrf/src/objective.obj build\temp.win-amd64-3.5\Release\pydensecrf/densecrf/src/labelcompatibility.obj build\temp.win-amd64-3.5\Release\pydensecrf/densecrf/src/util.obj build\temp.win-amd64-3.5\Release\pydensecrf/densecrf/external/liblbfgs/lib/lbfgs.obj /OUT:build\lib.win-amd64-3.5\pydensecrf/densecrf.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.5\Release\pydensecrf\densecrf.cp35-winamd64.lib > LINK : error LNK2001: unresolved external symbol PyInitpydensecrf/densecrf

lucasb-eyer commented 6 years ago

Hi, it's been a while I haven't coded any Python on Windows anymore, so I don't really know. I don't have the time to set up a machine for this currently, so you or someone else will have to try fixing it and if you do, please open a pull-request.

It looks like it might be related to #46, but I'm not sure.

alexlyzhov commented 6 years ago

I've successfully compiled this project on Windows 64 bit and Python 3.5.4 without this error.

liyemei commented 6 years ago

compiled it on Windows 64 bit and Python 2.7 with this error. @nikkou writing build\temp.win-amd64-2.7\Release\pydensecrf\eigen.def C:\Program Files\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin\g++.exe -mdll -static --entry _DllMain@12 --output-lib build\temp.win-amd64-2.7\Release\pydensecrf\libeigen.a --def build\temp.win-amd64-2.7\Release\pydensecrf\eigen.def -s build\temp.win-amd64-2.7\Release\pydensecrf\eigen.o build\temp.win-amd64-2.7\Release\pydensecrf\eigen_impl.o "-LC:\Program Files\Anaconda2\libs" "-LC:\Program Files\Anaconda2\PCbuild\amd64" "-LC:\Program Files\Anaconda2\PC\VS9.0\amd64" -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\pydensecrf\eigen.pyd g++: error: build\temp.win-amd64-2.7\Release\pydensecrf\libeigen.a: No such file or directory g++: error: unrecognized command line option '--output-lib'; did you mean '--output'? error: command 'C:\Program Files\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin\g++.exe' failed with exit status 1

alexlyzhov commented 6 years ago

@liyemei Seems like a completely different error from the one OP faced. Try to somehow use cl.exe (Visual Studio compiler) instead of g++.

liyemei commented 6 years ago

@adizhol Thank you!,but,how to use cl.exe to compile? I run "python setup.py install " in the cmd ,it still use g++

liyemei commented 6 years ago

@adizhol I've successfully compiled it .Thank you

Codekiller-Li commented 6 years ago

win64 py3.6 support? the error is: d:\programfiles\anaconda 3.6\include\pyconfig.h(59): fatal error C1083: 无法打开包括文件: “io.h”: No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

 i have try to pip install git+https://github.com/lucasb-eyer/pydensecrf.git
danielbraun89 commented 5 years ago

I have the same issue, with windows 10, python 3.6.7 (using cl.exe and not g++)