GithubHelp home page GithubHelp logo

Does not install on Windows about implicit HOT 8 CLOSED

Djoels avatar Djoels commented on August 18, 2024
Does not install on Windows

from implicit.

Comments (8)

benfred avatar benfred commented on August 18, 2024 1

@Aashit-Sharma What error are you seeing? There are a couple different ones in the thread above.

Also, there are now pre-built windows binaries that can be installed via conda-forge by conda install -c conda-forge implicit (assuming you're using anaconda).

from implicit.

benfred avatar benfred commented on August 18, 2024

I think the problem was the compile_args flags being set up in setup.py .

For windows machines I've changed the flags to be what are expected here: https://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx in the last commit

Could you verify this works? I don't have a windows machine to test on currently. I've uploaded these changes to pypi so going 'pip install implicit' should work

from implicit.

Djoels avatar Djoels commented on August 18, 2024

Thank you so much for looking into this!

Installation works now, but importing throws an error:

>>> import implicit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\XXX\AppData\Local\Continuum\Anaconda3\lib\site-packages\im
plicit-0.1.4-py3.5-win-amd64.egg\implicit\__init__.py", line 1, in <module>
    from .implicit import alternating_least_squares
  File "C:\Users\XXX\AppData\Local\Continuum\Anaconda3\lib\site-packages\im
plicit-0.1.4-py3.5-win-amd64.egg\implicit\implicit.py", line 6, in <module>
    from . import _implicit
ImportError: DLL load failed: %1 is not a valid Win32 application.

I am still figuring out what's wrong here.
Anyhow: thanks a lot for the effort!

from implicit.

benfred avatar benfred commented on August 18, 2024

So - I tried to add windows continuous integration support just now, without success for the moment: https://ci.appveyor.com/project/benfred/implicit . Will come back to it later

I think the error you have there might be related to a 64bit/32bit clash (though I'm not totally sure) This page https://github.com/cython/cython/wiki/CythonExtensionsOnWindows has some info on building cython extensions on windows that might help here

According to that page these errors might need these commands run:

set DISTUTILS_USE_SDK=1
setenv /x64 /release

in a command shell before trying to go pip install.

Let me know if this helps

from implicit.

Djoels avatar Djoels commented on August 18, 2024

Apparently the option /openmp is only relevant for the compile arguments and not for the linker (so maybe the following code is unnecessary? link_args = ['/openmp']
However this results only in a warning and an error.

The actual error is as follows:

    > link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\XXX\AppData\Local\Continuum\Anaconda3\libs /LIBPATH:C:\Users\XXX\AppData\Local\Continuum\Anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x
86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files
 (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x8
6)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Wind
ows Kits\8.1\lib\winv6.3\um\x64" /EXPORT:PyInit_implicit\_implicit build\temp.wi
n-amd64-3.5\Release\implicit\_implicit.obj /OUT:build\lib.win-amd64-3.5\implicit
\_implicit.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.5\Release\implicit\
_implicit.cp35-win_amd64.lib /openmp
    LINK : warning LNK4044: unrecognized option '/openmp'; ignored
    LINK : error LNK2001: unresolved external symbol PyInit_implicit\_implicit build\temp.win-amd64-3.5\Release\implicit\_implicit.cp35-win_amd64.lib :
fatal error LNK1120: 1 unresolved externals error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1120**

PS: Not a single issue on Mac OS X though.

PS2: I forgot to mention, execution the commands you mentioned in the previous post didn't work. For one thing there doesn't seem to be a 'setenv' command anymore in the visual studio 2015 distribution (with its Microsoft SDK)

from implicit.

benfred avatar benfred commented on August 18, 2024

So I think this commit fixes: 1ecca73

The build is running and tests complete on windows with appveyor at least: https://ci.appveyor.com/project/benfred/implicit

from implicit.

Djoels avatar Djoels commented on August 18, 2024

Thank you so much for looking into this! 👍

Upon retrying I see different errors, regarding to my MS compiler version, which is obviously out of your control.

from implicit.

Aashit-Sharma avatar Aashit-Sharma commented on August 18, 2024

I know it is really late but I am getting the same error while installing this on win 7 through pip

I tried to do the setenv command but it didnt work

Does this have something to do with newer python version ?

from implicit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.