How to install snappy C libraries on Windows 10 for use with python-snappy in Anaconda?

After a really long and frustrating time trying different methods to get the C files working, I found this site:

http://www.lfd.uci.edu/~gohlke/pythonlibs/

Where C. Gohlke has kindly compiled and uploaded the files for us windows users.

Just download the version you need based on your system and python version. I am using 64bits and python 3.6, so I used the following command from my download folder:

pip install python_snappy-0.5-cp36-cp36m-win_amd64.whl

It worked like a charm :)


It seems there are now Conda packages that should simplify things (in Anaconda). I was able to do (on Python 3.6, Windows 10):

conda install -c conda-forge snappy
conda install -c conda-forge python-snappy

EDIT: Refer to the other answers in this thread, I only keep this up for reference.

Here's the steps it took me to install Snappy and Python-Snappy on Windows 10:

  1. Install cygwin.
  2. Download snappy from http://google.github.io/snappy/ and unpack it somewhere into the cygwin directory.
  3. Write AM_PROG_AR into configure.ac above LT_INIT and run autogen.sh from the cygwin terminal, install missing cygwin packages if needed.
  4. Copy snappy-c.h into the Anaconda2/include folder and libsnappy.a into the Anaconda2/Lib folder (in ~/AppData/Local/Continuum/).
  5. stdint.h was missing for Visual C++ Compiler for Python 2.7., I found it here and put it into ~\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include.
  6. Installing python-snappy should now work without throwing any errors.
  7. If you get problems and weird imports check if the SnapPy library is also installed and deinstall it because it causes a conflict.

(Everything works fine now.)

EDIT: No it does not. This method is not reliable, once you try to update you run into new problems. And installing on Python 3 is another monster that isn't tackled by this solution.