xmlyqing00 / Cholmod-Scikit-Sparse-Windows

Set up cholmod and scikit-sparse python package on Windows.
GNU General Public License v3.0
37 stars 11 forks source link

python setup.py build error #2

Closed ThomasPellegrini closed 4 years ago

ThomasPellegrini commented 5 years ago

Hi The command python setup.py build returns error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\link.exe failed with exit status 1181

I'm using Windows 10 x64 with Anaconda 3 and Visual Studio 2017.

Build: PS C:\Users\User\Downloads\scikit-sparse-0.4.4> python setup.py build running build running build_py UPDATING build\lib.win-amd64-3.7\sksparse/_version.py set build\lib.win-amd64-3.7\sksparse/_version.py to '0.4.4' running build_ext skipping 'sksparse\cholmod.c' Cython extension (up-to-date) building 'sksparse.cholmod' extension C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python37\lib\site-packages\numpy\core\include -IC:\Python37/include -I/usr/include/suitesparse -IC:\Python37\include -IC:\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcsksparse\cholmod.c /Fobuild\temp.win-amd64-3.7\Release\sksparse\cholmod.obj cholmod.c c:\python37\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Python37\libs /LIBPATH:C:\Python37\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" cholmod.lib /EXPORT:PyInit_cholmod build\temp.win-amd64-3.7\Release\sksparse\cholmod.obj /OUT:build\lib.win-amd64-3.7\sksparse\cholmod.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\sksparse\cholmod.cp37-win_amd64.lib LINK : fatal error LNK1181: impossibile aprire il file di input 'cholmod.lib' error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\link.exe' failed with exit status 1181

xmlyqing00 commented 5 years ago

Thank you for your interest.

It seems that the computer cannot find the file cholmod.lib. Do you successfully compile the cholmod.lib in the first step?

walter9388 commented 4 years ago

Hi, Thanks for making this! Super useful and works perfectly :)

Just FYI I initially got the exact same error as @ThomasPellegrini. The reason it didn't work is because I misread step 2.1.2 in the README, and built the "INSTALL" project in debug mode rather than release mode. This meant that the library made was cholmodd.lib, not cholmod.lib, and obviously couldn't be found.

I hope this helps anyone in the future with the same issue.

xmlyqing00 commented 4 years ago

Hi, Thanks for making this! Super useful and works perfectly :)

Just FYI I initially got the exact same error as @ThomasPellegrini. The reason it didn't work is because I misread step 2.1.2 in the README, and built the "INSTALL" project in debug mode rather than release mode. This meant that the library made was cholmodd.lib, not cholmod.lib, and obviously couldn't be found.

I hope this helps anyone in the future with the same issue.

Thank you @walter9388 for your detailed report. That's very helpful to help others get rid of this trouble. I add your comment to the README now.