Link Errors Installing Python Blosc

608 views Asked by At

I installed C-Blosc library no problem, but when I try to install python-blosc and get to python setup.py build_ext --inplace --blosc="C:\\Program Files (x86)\\blosc" I get link errors. What's going on?

I have Windows 7 and am trying to install Python Blosc in MSVC 2015 from here https://github.com/Blosc.

running build_ext
building 'blosc.blosc_extension' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL 
/DNDEBUG /MD "-IC:\Program Files (x86)\blosc\include" -IC:\Users\adam.hendry\AppData\Local\Programs\Python\Python35\include -IC:\Users\adam.hendry\AppData\Local\Programs\Python\Python35\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /Tcblosc/blosc_extension.c /Fobuild\temp.win-amd64-3.5\Release\blosc/blosc_extension.obj
blosc_extension.c
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:\Program Files (x86)\blosc\lib" /LIBPATH:C:\Users\adam.hendry\AppData\Local\Programs\Python\Python35\libs /LIBPATH:C:\Users\adam.hendry\AppData\Local\Programs\Python\Python35\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x64" blosc.lib /EXPORT:PyInit_blosc_extension build\temp.win-amd64-3.5\Release\blosc/blosc_extension.obj /OUT:build\lib.win-amd64-3.5\blosc\blosc_extension.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.5\Release\blosc\blosc_extension.cp35-win_amd64.lib
blosc_extension.obj : warning LNK4197: export 'PyInit_blosc_extension' specified multiple times; using first specification
   Creating library build\temp.win-amd64-3.5\Release\blosc\blosc_extension.cp35-win_amd64.lib and 
object build\temp.win-amd64-3.5\Release\blosc\blosc_extension.cp35-win_amd64.exp
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_cbuffer_sizes
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_free_resources
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_cbuffer_complib    
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_destroy
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_get_complib_info
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_compress
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_set_nthreads
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_init
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_get_blocksize
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_compname_to_compcode
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_compress_ctx
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_set_blocksize
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_set_compressor
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_decompress_ctx
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_get_nthreads
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_compcode_to_compname
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_decompress
blosc_extension.obj : error LNK2001: unresolved external symbol blosc_list_compressors
build\lib.win-amd64-3.5\blosc\blosc_extension.cp35-win_amd64.pyd : fatal error LNK1120: 18 
unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' 
failed with exit status 1120
1

There are 1 answers

0
esc On

this is the maintainer of python-blosc here. As mentioned in the comments doing a pip install blosc will need a c-compiler and python development header files. This is the case because python-blosc isn't available as a wheel (state: 09 Feb 2019). You can however use conda to install pre-compiled binaries built via conda-forge:

conda install -c conda-forge python-blosc