kakao / buffalo

TOROS Buffalo: A fast and scalable production-ready open source project for recommender systems
Apache License 2.0
576 stars 106 forks source link

fix dependency in installing by pip #37

Closed js1010 closed 3 years ago

js1010 commented 3 years ago
# pip install buffalo
Collecting buffalo
  Downloading buffalo-1.2.1.tar.gz (2.6 MB)
     |################################| 2.6 MB 1.7 MB/s
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6j6xdcno/buffalo_1bdabc56745146b2b2c011aa4f232db3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6j6xdcno/buffalo_1bdabc56745146b2b2c011aa4f232db3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-5j01_aou
         cwd: /tmp/pip-install-6j6xdcno/buffalo_1bdabc56745146b2b2c011aa4f232db3/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-6j6xdcno/buffalo_1bdabc56745146b2b2c011aa4f232db3/setup.py", line 16, in <module>
        import n2
    ModuleNotFoundError: No module named 'n2'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.**
frostbyte134 commented 3 years ago

Anyone tested this PR? @ita9naiwa @js1010

  1. on ubuntu18 + fresh python3.7 venv
  2. install by pip install . (which uses pyproject.toml (PEP518), build isolation (PEP517))
  3. executing example_als.py example1, or performing pytest gives following error
    Traceback (most recent call last):
    File "example_als.py", line 7, in <module>
    from buffalo.algo.als import ALS
    File "/home/nailbrainz/buffalo_temp/buffalo/djangoenv2/lib/python3.7/site-packages/buffalo/algo/als.py", line 12, in <module>
    from buffalo.evaluate import Evaluable
    File "/home/nailbrainz/buffalo_temp/buffalo/djangoenv2/lib/python3.7/site-packages/buffalo/evaluate/__init__.py", line 1, in <module>
    from .base import Evaluable
    File "/home/nailbrainz/buffalo_temp/buffalo/djangoenv2/lib/python3.7/site-packages/buffalo/evaluate/base.py", line 3, in <module>
    from buffalo.parallel._core import quickselect
    ImportError: /tmp/pip-build-env-f080z5r0/overlay/lib/python3.7/site-packages/n2.cpython-37m-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory

    previous install command works. Only the ones wrt pyproject.toml fails. It would be great if anyone can provide commands used in the testing.

js1010 commented 3 years ago

I think the problem is n2==0.1.6 (cannot be properly installed by pip) => should be changed to n2 == 0.1.7, will make other PR thanks @nailbrainz