llvmlite icon indicating copy to clipboard operation
llvmlite copied to clipboard

Apple M1, poetry and tensorflow

Open oscar-defelice opened this issue 3 years ago • 4 comments

Reporting a bug

  • [x] I have tried using the latest released version of llvmlite (most recent is visible in the change log (https://github.com/numba/llvmlite/blob/main/CHANGE_LOG).
  • [ ] I have included a self contained code sample to reproduce the problem. i.e. it's possible to run as 'python bug.py'.

I am trying to add tensorflow and its dependencies on my project on a machine with an apple M1 processor with poetry. Notably, llvmlite is a tensorflow dependency. As far as I get from this issue this is due to the lack of a pre build wheel for M1.

Here is the output of poetry add tensorflow

note: This error originates from a subprocess, and is likely not a problem with pip.
  error: legacy-install-failure
  
  × Encountered error while trying to install package.
  ╰─> llvmlite
  
  note: This is an issue with the package mentioned above, not pip.
  hint: See above for output from the failure.
 

oscar-defelice avatar Jul 27 '22 08:07 oscar-defelice

I am trying to add tensorflow and its dependencies on my project on a machine with an apple M1 processor with poetry. Notably, llvmlite is a tensorflow dependency. As far as I get from this issue this is due to the lack of a pre build wheel for M1.

@oscar-defelice thank you for reporting this. Various questions come to mind:

  • Since when is llvmlite a dependency of tensorflow? I am unconvinced by this. Doing a github search, reveals that the string llvmlite does not appear in the tensorflow repository: https://github.com/tensorflow/tensorflow/search?q=llvmlite -- but perhaps I missed something?

  • It is unlikely that this is due to missing wheels for the M1 platform. These have been available for a few releases now: https://pypi.org/project/llvmlite/#files

  • I am currently under the assumption that this is a bug in poetry, specifically with the poetry resolver, as we have been debugging here: https://github.com/numba/numba/issues/8278#issuecomment-1195697388

Obviously, this is speculative, if you can get poetry to give you a more detailed error message that would be useful. Also, instructions on how to reproduce this (commands, environments, etc..) would also be useful as this would allow an llvmlite developer to try to reproduce your issue. Thank you!

esc avatar Jul 27 '22 08:07 esc

Hello @esc, thank you for your quick reply. Actually I opened an initial issue in poetry and they told me to come here 😃 https://github.com/python-poetry/poetry/issues/6079

I also believe it is there problem, indeed it seems poetry does not find a suitable version of llvmlite and tensorflow as well.

oscar-defelice avatar Jul 27 '22 08:07 oscar-defelice

This is the output of the command poetry add llvmlite --lock -vvv explicitly.

oscar-defelice avatar Jul 27 '22 09:07 oscar-defelice

that does not show any error at all

dimbleby avatar Jul 27 '22 10:07 dimbleby

I am closing this now as no new information has been shared. I saw that some issues related to poetry were due to stale caches. I am assuming this issue has been resolved by now but feel free to speak up, if this is not the case.

esc avatar Aug 30 '22 14:08 esc