Skip to content
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

Python 3.10 (and above) Support #675

Open
wutaomsft opened this issue Feb 20, 2023 · 7 comments
Open

Python 3.10 (and above) Support #675

wutaomsft opened this issue Feb 20, 2023 · 7 comments

Comments

@wutaomsft
Copy link

Hi,

Great work on lightfm! Curious if you have any plan/schedule to support Python 3.10 (and eventually 3.11). We are looking at supporting Python 3.10 at microsoft recommenders which depends on lightfm. It looks we will need lightfm to support it before we can move forward.
Thanks!

@maciejkula
Copy link
Collaborator

This should work with version 1.17. Please give it a go.

@ehuijzer
Copy link

I tried with Python 3.11.
In case no loss is specified, it does complete successfully.

However, I'm getting a hard error when using loss "warp", "bpr", "warp-kos".
No warning or error message.
Just exit code -1073741819 (0xC0000005)

I could debug down to fit_warp / fit_bpr / fit_warp_kos where the error occurs.

@ocardia
Copy link

ocardia commented May 24, 2023

I tried with both Python 3.10 and 3.11, and it failed with

  AttributeError: 'dict' object has no attribute '__LIGHTFM_SETUP__'

when using poetry, which also says

Note: This error originates from the build backend, and is likely not a problem with poetry but with lightfm (1.17) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "lightfm (==1.17)"'.

The latter wheel command fails as

Collecting lightfm==1.17
  Using cached lightfm-1.17.tar.gz (316 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "<**Redacted**>/.pyenv/versions/3.10.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "<**Redacted**>/.pyenv/versions/3.10.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "<**Redacted**>/.pyenv/versions/3.10.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/j9/r1tf7x3j7598t3xhss1v_wjw0000gp/T/pip-build-env-72ddgftg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/private/var/folders/j9/r1tf7x3j7598t3xhss1v_wjw0000gp/T/pip-build-env-72ddgftg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/j9/r1tf7x3j7598t3xhss1v_wjw0000gp/T/pip-build-env-72ddgftg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/private/var/folders/j9/r1tf7x3j7598t3xhss1v_wjw0000gp/T/pip-build-env-72ddgftg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 11, in <module>
      AttributeError: 'dict' object has no attribute '__LIGHTFM_SETUP__'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

I'll keep on investigating, but if someone has already made steps further, I'll gladly leap ahead. 😉

@np-n
Copy link

np-n commented Jul 4, 2023

I am stuck on the same issue in Python 3.10, the kernel dies when I try to call .fit() method.

@dym-ok
Copy link

dym-ok commented Nov 6, 2023

Hey @ocardia, did you have any luck with installing lightfm with Poetry? I'm having the same issue with Python 3.10.13 + Poetry 1.7.0 currently.

@ocardia
Copy link

ocardia commented Nov 6, 2023

To be honest, I tried again a couple of months ago with no success.

I may give it a try in a couple of weeks, but I'd need to check if there's work being done in this library at all, or directly consider moving away from it. 🤷🏻‍♂️ 😞

I'll keep you posted, regardless.

@dym-ok
Copy link

dym-ok commented Nov 6, 2023

I had to abandon Poetry in this project as I can still install it with pip.
But this is a worrying sign indeed 😟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants