benfred / implicit

Fast Python Collaborative Filtering for Implicit Feedback Datasets
https://benfred.github.io/implicit/
MIT License
3.57k stars 612 forks source link

pip install implicit fails for implicit 0.5.0 #533

Closed monkey0head closed 2 years ago

monkey0head commented 2 years ago

Hi! I noticed there is a new release, but unfortunately I was not able to install implicit with pip on local machine (macos) and in google colab. see traceback:

pip install implicit
Collecting implicit
  Downloading implicit-0.5.0.tar.gz (71 kB)
     |████████████████████████████████| 71 kB 1.3 MB/s             
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/a/test_implicit_install/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/0t/bd4dgmln0tv6jl44fphftkkm0000gq/T/pip-install-td1bbsu0/implicit_a0e4357db206441fb553f1dc3054709a/setup.py'"'"'; __file__='"'"'/private/var/folders/0t/bd4dgmln0tv6jl44fphftkkm0000gq/T/pip-install-td1bbsu0/implicit_a0e4357db206441fb553f1dc3054709a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/0t/bd4dgmln0tv6jl44fphftkkm0000gq/T/pip-pip-egg-info-cpoj578y
       cwd: /private/var/folders/0t/bd4dgmln0tv6jl44fphftkkm0000gq/T/pip-install-td1bbsu0/implicit_a0e4357db206441fb553f1dc3054709a/
  Complete output (5 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/0t/bd4dgmln0tv6jl44fphftkkm0000gq/T/pip-install-td1bbsu0/implicit_a0e4357db206441fb553f1dc3054709a/setup.py", line 5, in <module>
      from skbuild import setup
  ModuleNotFoundError: No module named 'skbuild'

I installed scikit-build and it started to get error related to cmake. I tried install cmake with brew and pip, but it does not help. I just want to add implicit as a dependence in my own project, and it worked well with 0.4.8. Could you please have a look?

I have python 3.9 and pip 21.3.1

damienchambon commented 2 years ago

I have the same issue as well

benfred commented 2 years ago

Thanks for the bug report!

It looks like the pyproject.toml file didn't get bundled into the sdist package - which means that the scikit-build and cmake dependencies didn't get installed. I'll get a fix out soon.

I tried install cmake with brew and pip, but it does not help.

You should be able to pip install the build dependencies - https://github.com/benfred/implicit/blob/main/pyproject.toml#L5-L14 and it should work. Whats the error after pip installing scikit-build and cmake?

benfred commented 2 years ago

I've updated the manifest - and verified the build on google colab for implicit v0.5.1:

Screen Shot 2022-01-28 at 10 26 16 AM
monkey0head commented 2 years ago

Whats the error after pip installing scikit-build and cmake?

Thanks, everything works now)

benfred commented 2 years ago

Glad to hear its working !