{"action":"created","issue":{"url":"https://api.github.com/repos/spotify/annoy/issues/97","repository_url":"https://api.github.com/repos/spotify/annoy","labels_url":"https://api.github.com/repos/spotify/annoy/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/spotify/annoy/issues/97/comments","events_url":"https://api.github.com/repos/spotify/annoy/issues/97/events","html_url":"https://github.com/spotify/annoy/issues/97","id":102659754,"number":97,"title":"Windows support?","user":{"login":"sergeyf","id":1874668,"avatar_url":"https://avatars.githubusercontent.com/u/1874668?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeyf","html_url":"https://github.com/sergeyf","followers_url":"https://api.github.com/users/sergeyf/followers","following_url":"https://api.github.com/users/sergeyf/following{/other_user}","gists_url":"https://api.github.com/users/sergeyf/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeyf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeyf/subscriptions","organizations_url":"https://api.github.com/users/sergeyf/orgs","repos_url":"https://api.github.com/users/sergeyf/repos","events_url":"https://api.github.com/users/sergeyf/events{/privacy}","received_events_url":"https://api.github.com/users/sergeyf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-08-23T20:52:49Z","updated_at":"2016-04-22T08:11:11Z","closed_at":"2016-04-22T00:15:59Z","body":"The readme suggests that `pip install annoy` should work on Windows, but I get the following error:\r\n\r\n```\r\nc:\\users\\s\\appdata\\local\\temp\\pip-build-jintu9\\annoy\\src\\annoylib.h(21) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory\r\n```\r\n\r\nMy googling tells me that `unistd.h` is a Linux-only file.\r\n\r\nIs there an easy fix for this?\r\n\r\nThanks for the awesome package!\r\n\r\n\r\nAnd in case the full error message is useful:\r\n```\r\nC:\\Anaconda>pip install annoy\r\nCollecting annoy\r\n  Downloading annoy-1.5.2.tar.gz (625kB)\r\n    100% |################################| 626kB 409kB/s\r\nBuilding wheels for collected packages: annoy\r\n  Running setup.py bdist_wheel for annoy\r\n  Complete output from command C:\\Anaconda\\python.exe -c \"import setuptools;__file__='c:\\\\users\\\\s\\\\appdata\\\\local\\\\temp\\\\pip-build-jintu9\\\\annoy\\\\set\r\nup.py';exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" bdist_wheel -d c:\\users\\s\\appdata\\local\\temp\\tmpwwwitjpip-wheel-:\r\n\r\n  running bdist_wheel\r\n  running build\r\n  running build_py\r\n  creating build\r\n  creating build\\lib.win-amd64-2.7\r\n  creating build\\lib.win-amd64-2.7\\annoy\r\n  copying annoy\\__init__.py -> build\\lib.win-amd64-2.7\\annoy\r\n  running build_ext\r\n  building 'annoy.annoylib' extension\r\n  creating build\\temp.win-amd64-2.7\r\n  creating build\\temp.win-amd64-2.7\\Release\r\n  creating build\\temp.win-amd64-2.7\\Release\\src\r\n  C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\\Anaconda\\inclu\r\nde -IC:\\Anaconda\\PC /Tpsrc/annoymodule.cc /Fobuild\\temp.win-amd64-2.7\\Release\\src/annoymodule.obj -O3 -march=native -ffast-math\r\n  cl : Command line warning D9002 : ignoring unknown option '-O3'\r\n  cl : Command line warning D9002 : ignoring unknown option '-march=native'\r\n  cl : Command line warning D9002 : ignoring unknown option '-ffast-math'\r\n  annoymodule.cc\r\n  C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Include\\xlocale(342) : warning C4530: C++ exception handler used, but unw\r\nind semantics are not enabled. Specify /EHsc\r\n  c:\\users\\s\\appdata\\local\\temp\\pip-build-jintu9\\annoy\\src\\annoylib.h(21) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or d\r\nirectory\r\n  error: command 'C:\\\\Program Files (x86)\\\\Common Files\\\\Microsoft\\\\Visual C++ for Python\\\\9.0\\\\VC\\\\Bin\\\\amd64\\\\cl.exe' failed with exit status 2\r\n\r\n  ----------------------------------------\r\n  Failed building wheel for annoy\r\nFailed to build annoy\r\nInstalling collected packages: annoy\r\n  Running setup.py install for annoy\r\n    Complete output from command C:\\Anaconda\\python.exe -c \"import setuptools, tokenize;__file__='c:\\\\users\\\\s\\\\appdata\\\\local\\\\temp\\\\pip-build-jintu9\r\n\\\\annoy\\\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record c:\\users\\\r\ns\\appdata\\local\\temp\\pip-5cyqoc-record\\install-record.txt --single-version-externally-managed --compile:\r\n    running install\r\n    running build\r\n    running build_py\r\n    running build_ext\r\n    building 'annoy.annoylib' extension\r\n    C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\\Anaconda\\inc\r\nlude -IC:\\Anaconda\\PC /Tpsrc/annoymodule.cc /Fobuild\\temp.win-amd64-2.7\\Release\\src/annoymodule.obj -O3 -march=native -ffast-math\r\n    cl : Command line warning D9002 : ignoring unknown option '-O3'\r\n    cl : Command line warning D9002 : ignoring unknown option '-march=native'\r\n    cl : Command line warning D9002 : ignoring unknown option '-ffast-math'\r\n    annoymodule.cc\r\n    C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Include\\xlocale(342) : warning C4530: C++ exception handler used, but u\r\nnwind semantics are not enabled. Specify /EHsc\r\n    c:\\users\\s\\appdata\\local\\temp\\pip-build-jintu9\\annoy\\src\\annoylib.h(21) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or\r\n directory\r\n    error: command 'C:\\\\Program Files (x86)\\\\Common Files\\\\Microsoft\\\\Visual C++ for Python\\\\9.0\\\\VC\\\\Bin\\\\amd64\\\\cl.exe' failed with exit status 2\r\n\r\n    ----------------------------------------\r\nCommand \"C:\\Anaconda\\python.exe -c \"import setuptools, tokenize;__file__='c:\\\\users\\\\s\\\\appdata\\\\local\\\\temp\\\\pip-build-jintu9\\\\annoy\\\\setup.py';exec(\r\ncompile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record c:\\users\\s\\appdata\\local\\temp\\pip\r\n-5cyqoc-record\\install-record.txt --single-version-externally-managed --compile\" failed with error code 1 in c:\\users\\s\\appdata\\local\\temp\\pip-build-j\r\nintu9\\annoy\r\n```"},"comment":{"url":"https://api.github.com/repos/spotify/annoy/issues/comments/213316133","html_url":"https://github.com/spotify/annoy/issues/97#issuecomment-213316133","issue_url":"https://api.github.com/repos/spotify/annoy/issues/97","id":213316133,"user":{"login":"erikbern","id":1027979,"avatar_url":"https://avatars.githubusercontent.com/u/1027979?v=3","gravatar_id":"","url":"https://api.github.com/users/erikbern","html_url":"https://github.com/erikbern","followers_url":"https://api.github.com/users/erikbern/followers","following_url":"https://api.github.com/users/erikbern/following{/other_user}","gists_url":"https://api.github.com/users/erikbern/gists{/gist_id}","starred_url":"https://api.github.com/users/erikbern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikbern/subscriptions","organizations_url":"https://api.github.com/users/erikbern/orgs","repos_url":"https://api.github.com/users/erikbern/repos","events_url":"https://api.github.com/users/erikbern/events{/privacy}","received_events_url":"https://api.github.com/users/erikbern/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T08:11:11Z","updated_at":"2016-04-22T08:11:11Z","body":"nice!"}}