title: How to install google snappy library on windows?
body: <p>I am on Windows 8.1, Python 3.5. </p>
  
  <p><strong>Short version:</strong> I want to install the parquet package via pip. I got stuck at compiling google's snappy library. What are the steps I should take to compile the snappy library on windows? Where should the library be located? Else, is there an alternative way to process parquet using python?</p>
  
  <p><strong>Long version:</strong></p>
  
  <pre><code>C:\Users\sdf&gt;pip install parquet
  Collecting parquet
    Using cached parquet-1.1-py3-none-any.whl
  Collecting python-snappy (from parquet)
    Using cached python-snappy-0.5.tar.gz
  Requirement already satisfied: thriftpy&gt;=0.3.6 in c:\users\sdf\appdata\local\pr
  ograms\python\python35-32\lib\site-packages (from parquet)
  Requirement already satisfied: ply&lt;4.0,&gt;=3.4 in c:\users\sdf\appdata\local\prog
  rams\python\python35-32\lib\site-packages (from thriftpy&gt;=0.3.6-&gt;parquet)
  Installing collected packages: python-snappy, parquet
    Running setup.py install for python-snappy ... error
      Complete output from command c:\users\sdf\appdata\local\programs\python\pyt
  hon35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Data
  \\AppData\\Local\\Temp\\pip-build-3o1be9ua\\python-snappy\\setup.py';f=getattr(t
  okenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();e
  xec(compile(code, __file__, 'exec'))" install --record C:\Users\sdf\AppData\Loc
  al\Temp\pip-en53ikyp-record\install-record.txt --single-version-externally-manag
  ed --compile:
      running install
      running build
      running build_py
      creating build
      creating build\lib.win32-3.5
      copying snappy.py -&gt; build\lib.win32-3.5
      running build_ext
      building '_snappy' extension
      creating build\temp.win32-3.5
      creating build\temp.win32-3.5\Release
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo
   /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\sdf\appdata\local\programs\python\python35
  -32\include -Ic:\users\sdf\appdata\local\programs\python\python35-32\include "-
  IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program F
  iles (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\
  Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8
  .1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\
  Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tpsnappymodule.cc /Fo
  build\temp.win32-3.5\Release\snappymodule.obj
      snappymodule.cc
      snappymodule.cc(31): fatal error C1083: Cannot open include file: 'snappy-c.
  h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\B
  IN\\cl.exe' failed with exit status 2
  
      ----------------------------------------
  Command "c:\users\sdf\appdata\local\programs\python\python35-32\python.exe -u -
  c "import setuptools, tokenize;__file__='C:\\Users\\sdf\\AppData\\Local\\Temp\\
  pip-build-3o1be9ua\\python-snappy\\setup.py';f=getattr(tokenize, 'open', open)(_
  _file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file
  __, 'exec'))" install --record C:\Users\sdf\AppData\Local\Temp\pip-en53ikyp-rec
  ord\install-record.txt --single-version-externally-managed --compile" failed wit
  h error code 1 in C:\Users\sdf\AppData\Local\Temp\pip-build-3o1be9ua\python-sna
  ppy\
  </code></pre>
  
  <p>Seeing that the snappy library is not installed, I downloaded it from <a href="http://google.github.io/snappy/" rel="nofollow noreferrer">google's snappy page</a></p>
  
  <p>I now have the files, and must try to compile and install them. I notice there is an autogen.sh script included. </p>
  
  <p>Since this is Windows, I used the mingw64 shell to execute autogen.sh. It then returns this error</p>
  
  <pre><code>./autogen.sh: line 3: aclocal: command not found
  </code></pre>
  
  <p>Okay, so I find out that aclocal is part of automake, which I also have to install. </p>
  
  <p>I downloaded and installed automake <a href="http://gnuwin32.sourceforge.net/packages/automake.htm" rel="nofollow noreferrer">here</a>, using both setup files on the page (one for sources, one for everything else except sources)</p>
  
  <p>Now I have automake installed, but still have the same error:</p>
  
  <pre><code>./autogen.sh: line 3: aclocal: command not found
  </code></pre>
  
  <p>Next, I decided to try compiling the library with Cygwin instead. So I downloaded it, added a few dev packages including automake and gcc, extracted the snappy tarball into my working directory, and ran <code>bash autogen.sh</code></p>
  
  <pre><code>$ bash autogen.sh
  Unescaped left brace in regex is deprecated, passed through in regex; marked by &lt;-- HERE in m/\${ &lt;-- HERE ([^ \t=:+{}]+)}/ at /usr/bin/automake-1.14 line 3930.
  /usr/share/automake-1.14/am/ltlibrary.am: warning: 'libsnappy.la': linking libtool libraries using a non-POSIX
  /usr/share/automake-1.14/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
  Makefile.am:4:   while processing Libtool library 'libsnappy.la'
  </code></pre>
  
  <p>Nothing broke, and the file <code>configure</code> was created. So I ran <code>$ ./configure</code>. This is the output.</p>
  
  <pre><code>checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
  checking for gawk... gawk
  checking whether make sets $(MAKE)... no
  checking whether make supports nested variables... no
  checking build system type... x86_64-unknown-cygwin
  checking host system type... x86_64-unknown-cygwin
  checking how to print strings... printf
  checking for style of include used by make... none
  checking for gcc... gcc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.exe
  checking for suffix of executables... .exe
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether gcc accepts -g... yes
  checking for gcc option to accept ISO C89... none needed
  checking whether gcc understands -c and -o together... yes
  checking dependency style of gcc... none
  checking for a sed that does not truncate output... /usr/bin/sed
  checking for grep that handles long lines and -e... /usr/bin/grep
  checking for egrep... /usr/bin/grep -E
  checking for fgrep... /usr/bin/grep -F
  checking for ld used by gcc... /usr/x86_64-pc-cygwin/bin/ld.exe
  checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
  checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
  checking the name lister (/usr/bin/nm -B) interface... BSD nm
  checking whether ln -s works... yes
  checking the maximum length of command line arguments... 8192
  checking how to convert x86_64-unknown-cygwin file names to x86_64-unknown-cygwin format... func_convert_file_noop
  checking how to convert x86_64-unknown-cygwin file names to toolchain format... func_convert_file_noop
  checking for /usr/x86_64-pc-cygwin/bin/ld.exe option to reload object files... -r
  checking for objdump... objdump
  checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
  checking for dlltool... dlltool
  checking how to associate runtime and link libraries... func_cygming_dll_for_implib
  checking for ar... ar
  checking for archiver @FILE support... @
  checking for strip... strip
  checking for ranlib... ranlib
  checking command to parse /usr/bin/nm -B output from gcc object... ok
  checking for sysroot... no
  checking for a working dd... /usr/bin/dd
  checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
  checking for mt... no
  checking if : is a manifest tool... no
  checking how to run the C preprocessor... gcc -E
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking for dlfcn.h... yes
  checking for objdir... .libs
  checking if gcc supports -fno-rtti -fno-exceptions... no
  checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
  checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
  checking if gcc static flag -static works... yes
  checking if gcc supports -c -o file.o... yes
  checking if gcc supports -c -o file.o... (cached) yes
  checking whether the gcc linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
  checking whether -lc should be explicitly linked in... yes
  checking dynamic linker characteristics... Win32 ld.exe
  checking how to hardcode library paths into programs... immediate
  checking whether stripping libraries is possible... yes
  checking if libtool supports shared libraries... yes
  checking whether to build shared libraries... yes
  checking whether to build static libraries... yes
  checking for g++... g++
  checking whether we are using the GNU C++ compiler... yes
  checking whether g++ accepts -g... yes
  checking dependency style of g++... none
  checking how to run the C++ preprocessor... g++ -E
  checking for ld used by g++... /usr/x86_64-pc-cygwin/bin/ld.exe
  checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
  checking whether the g++ linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
  checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
  checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
  checking if g++ static flag -static works... yes
  checking if g++ supports -c -o file.o... yes
  checking if g++ supports -c -o file.o... (cached) yes
  checking whether the g++ linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
  checking dynamic linker characteristics... Win32 ld.exe
  checking how to hardcode library paths into programs... immediate
  checking whether byte ordering is bigendian... no
  checking for size_t... yes
  checking for ssize_t... yes
  checking for stdint.h... (cached) yes
  checking stddef.h usability... yes
  checking stddef.h presence... yes
  checking for stddef.h... yes
  checking sys/mman.h usability... yes
  checking sys/mman.h presence... yes
  checking for sys/mman.h... yes
  checking sys/resource.h usability... yes
  checking sys/resource.h presence... yes
  checking for sys/resource.h... yes
  checking windows.h usability... yes
  checking windows.h presence... yes
  checking for windows.h... yes
  checking byteswap.h usability... yes
  checking byteswap.h presence... yes
  checking for byteswap.h... yes
  checking sys/byteswap.h usability... no
  checking sys/byteswap.h presence... no
  checking for sys/byteswap.h... no
  checking sys/endian.h usability... no
  checking sys/endian.h presence... no
  checking for sys/endian.h... no
  checking sys/time.h usability... yes
  checking sys/time.h presence... yes
  checking for sys/time.h... yes
  checking for mmap... yes
  checking for 'gtest-config'... checking for gtest-config... no
  no
  checking for pkg-config... /usr/bin/pkg-config
  checking pkg-config is at least version 0.9.0... yes
  checking for gflags... no
  checking if the compiler supports __builtin_expect... yes
  checking if the compiler supports __builtin_ctzll... yes
  checking for zlibVersion in -lz... no
  checking for lzo1x_1_15_compress in -llzo2... no
  checking for lzf_compress in -llzf... no
  checking for fastlz_compress in -lfastlz... no
  checking for qlz_compress in -lquicklz... no
  checking that generated files are newer than configure... done
  configure: creating ./config.status
  config.status: creating Makefile
  config.status: creating snappy-stubs-public.h
  config.status: creating snappy.pc
  config.status: creating config.h
  config.status: executing depfiles commands
  config.status: executing libtool commands
  </code></pre>
  
  <p>I ran <code>make</code> next but it didn't work.</p>
  
  <p>I cannot compile the library for snappy, and so I'm stuck with the parquet installation.</p>
  
  <p>How do I set up the library in windows?</p>