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

Best practice for installation via poetry using M1 mac (arm chip) #182

Open
jamesowers-roo opened this issue Jun 22, 2023 · 2 comments
Open

Comments

@jamesowers-roo
Copy link

jamesowers-roo commented Jun 22, 2023

I've managed to get the installation via poetry to work by explicitly pointing to the wheel URL e.g.

[tool.poetry.dependencies]
tensorflow-decision-forests = [
    { markers = "sys_platform != 'darwin' or platform_machine != 'arm64'", version = "==1.3.0" },
    { markers = "sys_platform == 'darwin' and platform_machine == 'arm64'", url = "https://files.pythonhosted.org/packages/7a/a4/e818814fec37812222f77ae85b41bd6a95c4c90b0b92e03c9c9577601056/tensorflow_decision_forests-1.3.0-cp310-cp310-macosx_12_0_arm64.whl" }
]

The reason the installation via a simple

[tool.poetry.dependencies]
tensorflow-decision-forests = "==1.3.0"

doesn't work, is that tensorflow-decision-forests expects the dependency tensorflow (which doesn't exist for arm mac, one needs tensorflow-macos instead). This dependency is specified correctly within the mac arm64 wheel distributed here: https://pypi.org/project/tensorflow-decision-forests/#files

Is there a better way to achieve this? e.g. is there a documented installation option e.g. pip install 'tensorflow-decision-forests==1.3.0[macos] which I have missed?

@rstz
Copy link
Collaborator

rstz commented Jun 22, 2023

Hi,
I'm not very familiar with Poetry, so I believe that this is the best strategy that's available at this point.

If anyone can open a PR that opens a better way - maybe some changes to our setup.py - I'll be happy to integrate it into our next release!

@rstz rstz added the help wanted Extra attention is needed label Jun 22, 2023
@rstz
Copy link
Collaborator

rstz commented Aug 2, 2023

Since tensorflow seems to have consolidated into one package (no need for tensorflow-macos anymore), I expect this to be fixed with the next version.

@rstz rstz added fixed in next version and removed help wanted Extra attention is needed labels Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants