gallantlab / pycortex

Pycortex is a python-based toolkit for surface visualization of fMRI data
https://gallantlab.github.io/pycortex
BSD 2-Clause "Simplified" License
594 stars 139 forks source link

[WINDOWS] fatal error LNK1181: cannot open input file 'm.lib' #248

Closed axifra closed 6 years ago

axifra commented 6 years ago

Hi,

I am trying to install pycortex in Windows and I ran into an error. This is the error message that I get when I run: python setup.py develop

LINK : fatal error LNK1181: cannot open input file 'm.lib' error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:\Anaconda\libs /LIBPATH:D:\Anaconda\PCbuild\amd64 /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" m.lib /EXPORT:PyInit_openctm build\temp.win-amd64-3.5\Release\cortex/openctm.obj build\temp.win-amd64-3.5\Release\OpenCTM-1.0.3/lib/openctm.obj build\temp.win-amd64-3.5\Release\OpenCTM-1.0.3/lib/stream.obj build\temp.win-amd64-3.5\Release\OpenCTM-1.0.3/lib/compressRAW.obj build\temp.win-amd64-3.5\Release\OpenCTM-1.0.3/lib/compressMG1.obj build\temp.win-amd64-3.5\Release\OpenCTM-1.0.3/lib/compressMG2.obj build\temp.win-amd64-3.5\Release\OpenCTM-1.0.3/lib/liblzma/Alloc.obj build\temp.win-amd64-3.5\Release\OpenCTM-1.0.3/lib/liblzma/LzFind.obj build\temp.win-amd64-3.5\Release\OpenCTM-1.0.3/lib/liblzma/LzmaDec.obj build\temp.win-amd64-3.5\Release\OpenCTM-1.0.3/lib/liblzma/LzmaEnc.obj build\temp.win-amd64-3.5\Release\OpenCTM-1.0.3/lib/liblzma/LzmaLib.obj /OUT:build\lib.win-amd64-3.5\cortex\openctm.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.5\Release\cortex\openctm.cp35-win_amd64.lib" failed with exit status 1181

I am using Anaconda, python 3.5, and I installed Visual Studio C++ Compiler 2015

Thanks!

v754424340 commented 6 years ago

got the same problem like you:

$ python setup.py develop running develop running egg_info writing pycortex.egg-info\PKG-INFO writing dependency_links to pycortex.egg-info\dependency_links.txt writing top-level names to pycortex.egg-info\top_level.txt reading manifest file 'pycortex.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pycortex.egg-info\SOURCES.txt' running build_ext No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'cortex.openctm' extension C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -IC:\Python3\lib\site-packages\numpy\core\include -IC:\Python3\include -IC:\Python3\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\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tccortex/openctm.c /Fobuild\temp.win-amd64-3.6\Release\cortex/openctm.obj C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -IC:\Python3\lib\site-packages\numpy\core\include -IC:\Python3\include -IC:\Python3\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\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcOpenCTM-1.0.3/lib/openctm.c /Fobuild\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/openctm.obj C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -IC:\Python3\lib\site-packages\numpy\core\include -IC:\Python3\include -IC:\Python3\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\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcOpenCTM-1.0.3/lib/stream.c /Fobuild\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/stream.obj C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -IC:\Python3\lib\site-packages\numpy\core\include -IC:\Python3\include -IC:\Python3\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\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcOpenCTM-1.0.3/lib/compressRAW.c /Fobuild\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/compressRAW.obj C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -IC:\Python3\lib\site-packages\numpy\core\include -IC:\Python3\include -IC:\Python3\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\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcOpenCTM-1.0.3/lib/compressMG1.c /Fobuild\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/compressMG1.obj C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -IC:\Python3\lib\site-packages\numpy\core\include -IC:\Python3\include -IC:\Python3\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\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcOpenCTM-1.0.3/lib/compressMG2.c /Fobuild\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/compressMG2.obj C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -IC:\Python3\lib\site-packages\numpy\core\include -IC:\Python3\include -IC:\Python3\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\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcOpenCTM-1.0.3/lib/liblzma/Alloc.c /Fobuild\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/Alloc.obj C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -IC:\Python3\lib\site-packages\numpy\core\include -IC:\Python3\include -IC:\Python3\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\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcOpenCTM-1.0.3/lib/liblzma/LzFind.c /Fobuild\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzFind.obj C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -IC:\Python3\lib\site-packages\numpy\core\include -IC:\Python3\include -IC:\Python3\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\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcOpenCTM-1.0.3/lib/liblzma/LzmaDec.c /Fobuild\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzmaDec.obj C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -IC:\Python3\lib\site-packages\numpy\core\include -IC:\Python3\include -IC:\Python3\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\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcOpenCTM-1.0.3/lib/liblzma/LzmaEnc.c /Fobuild\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzmaEnc.obj C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -IC:\Python3\lib\site-packages\numpy\core\include -IC:\Python3\include -IC:\Python3\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\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcOpenCTM-1.0.3/lib/liblzma/LzmaLib.c /Fobuild\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzmaLib.obj C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Python3\libs /LIBPATH:C:\Python3\PCbuild\amd64 /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" /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" m.lib /EXPORT:PyInit_openctm build\temp.win-amd64-3.6\Release\cortex/openctm.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/openctm.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/stream.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/compressRAW.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/compressMG1.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/compressMG2.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/Alloc.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzFind.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzmaDec.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzmaEnc.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzmaLib.obj /OUT:build\lib.win-amd64-3.6\cortex\openctm.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\cortex\openctm.cp36-win_amd64.lib LINK : fatal error LNK1181: cannot open input file 'm.lib' error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Python3\libs /LIBPATH:C:\Python3\PCbuild\amd64 /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" /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" m.lib /EXPORT:PyInit_openctm build\temp.win-amd64-3.6\Release\cortex/openctm.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/openctm.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/stream.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/compressRAW.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/compressMG1.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/compressMG2.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/Alloc.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzFind.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzmaDec.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzmaEnc.obj build\temp.win-amd64-3.6\Release\OpenCTM-1.0.3/lib/liblzma/LzmaLib.obj /OUT:build\lib.win-amd64-3.6\cortex\openctm.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\cortex\openctm.cp36-win_amd64.lib" failed with exit status 1181

danielyon commented 6 years ago

I've had the same issue. I tried removing the 'm' library from the setup.py script. This ended up giving me an installed module I could import but I got openctm errors when I tried to run any of the demos.

marklescroart commented 6 years ago

Apologies; we do not support windows installs. None of the developers work on windows, and it is currently outside our capacity to manage this type of cross-platform problem.