New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows build issue #209
Comments
sorry, but seems this is something in cygwin/anaconda rather than annoy? |
Hi Erik, After a bit of pain, I set up a new VM (I'm a Mac user) with no Anaconda, and just a vanilla mingw32 install. Still doesn't work, and the errors also seem to be in the disutils library. Is it possible that the problem is a python 3.6 compatibility thing ? C:\annoy>python setup.py build --compiler=mingw32 PS - there's no cygwin on this VM, so the cygwin errors look a bit odd. |
OK, so some progress, but still doesn't work. For anyone else hitting this problem, you need to patch the distutils section in your Python install (ugly) as follows: https://stackoverflow.com/questions/34135280/valueerror-unknown-ms-compiler-version-1900 That said, it's still not compiling... writing build\temp.win-amd64-3.6\Release\src\annoylib.cp36-win_amd64.def |
Hmmm...given what a PITA this is, is it worth putting a Windows binary up on the repo ? |
would be great if someone could figure out how to build it consistently https://www.appveyor.com/ would be nice too |
Agreed - Annoy works fantastically well on my Mac, but after hours and hours of trying everything I can think of, I still can't build it on Windows (7 or 10). |
@MonkeyChap I'm trying to confirm that it still compiles in gcc before sending a PR (I only have access to bash subsystem for Windows so I'm not 100% sure it is the same though). Most changes were in the annoylib.h header but I had to fiddle with compiler arguments in setup.py as well. |
Thanks - I'll give it a try ! Would be really great to just have something that installs with pip though :) |
very nice @tjrileywisc ! |
I can confirm it compiles (first time !) on windows with no messing about required. I did find another another problem though which is totally unrelated to the Windows stuff. I'll dig into it some more and post another thread. |
Hello, I'm trying to build on windows and also had difficulty. I cloned @tjrileywisc's branch. @MonkeyChap, how did you compile it? I appreciate any help! |
It should compile if you just run |
@tjrileywisc
|
@MBetters You can get it from here, and since you're using the You should be able to compile it after that. |
@tjrileywisc
|
Nevermind, I just updated my project to python 3.6 and installing and using annoy worked. Although, it would be nice to have this work with windows 10/python 2.7 in the future. |
For anyone still monitoring this thread, Windows support from my fork was just merged (#233) Only python 3 is working (3.6 is working, anything with a MSVC 2015 compiler should be okay). 2.7 not working yet. |
Actually, I still have the error on Windows 10 using Python 3.6 and trying to install
Seems like it's not fixed after all? |
@stefanbschneider Do you have Visual Studio 2015 or later installed? The redistributables are needed to run binaries, but annoy doesn't ship with a binary, so Visual Studio itself is needed to compile it. You can get Visual Studio community 2015 from here: VS 2019 may work as well, though I haven't tried this myself. You'd have to make sure the compiler version matches what your python binary was originally made with. |
Yes, I have VS2019 installed.
How do I do that? |
Ok, interesting. So I guess, for Py3.6, I'd have to install VS2015. |
Hi,
I'm trying to build with mingw32 on windows (Anaconda python v3.6) and getting errors that look like they're in the python rather than the C:
C:\annoy>python setup.py build --compiler=mingw32
running build
running build_py
running build_ext
Traceback (most recent call last):
File "setup.py", line 69, in
setup_requires=['nose>=1.0']
File "C:\Users\Ian\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Ian\Anaconda3\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\Ian\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Ian\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Ian\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Ian\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Ian\Anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 75, in run
_build_ext.run(self)
File "C:\Users\Ian\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 185, in run
_build_ext.build_ext.run(self)
File "C:\Users\Ian\Anaconda3\lib\distutils\command\build_ext.py", line 308, in run
force=self.force)
File "C:\Users\Ian\Anaconda3\lib\distutils\ccompiler.py", line 1031, in new_compiler
return klass(None, dry_run, force)
File "C:\Users\Ian\Anaconda3\lib\distutils\cygwinccompiler.py", line 282, in init
CygwinCCompiler.init (self, verbose, dry_run, force)
File "C:\Users\Ian\Anaconda3\lib\distutils\cygwinccompiler.py", line 126, in init
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
Any ideas what's causing it ?
The text was updated successfully, but these errors were encountered: