-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Cannot Install tensorflow 2.9.1 #6079
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
Comments
I don't thing this has anything to do with Poetry, since the issue happens when building the wheel locally. The issue itself is probably that you are using a Mac M1, which using arm64 architecture, but the version of I would suggest searching https://github.com/tensorflow/tensorflow issue tracker, and if nothing matches your issue, opening an issue there. |
I opened an issue in llvmlite numba/llvmlite#868, but they say they have m1 wheels since a couple of months. |
there is no built wheel at the version of llvmlite that you are trying to install though. we've already been through this in the duplicate issues that I linked, please close |
@dimbleby Thank you for your answer. Can you please show me where I can find which version I should add to my project? |
the output you pasted shows that you are trying to install "0.38.0" |
Thank you. Same problem with 0.39.0 |
then there isn't a built wheel suitable for your environment at 0.39.0 |
This is not correct. There are pre-built wheels for llvmlite 0.39.0 for OSX ARM64 for Python 3.8, 3.9 and 3.10 available from PyPi: https://pypi.org/project/llvmlite/#files Is there anything that make these wheels unsuitable? |
please show output in which poetry fails to install 0.39.0 |
The error is the same posted above if I run However, now when I run |
these statements are not consistent
it's possible that you also have some #5970 hangover, maybe worth clearing your poetry cache and re-locking. |
Ok, done. Now I have the following pyproject.toml
and when I run 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.
at ~/miniconda3/envs/tempr/lib/python3.9/site-packages/poetry/utils/env.py:1195 in _run
1191│ output = subprocess.check_output(
1192│ cmd, stderr=subprocess.STDOUT, **kwargs
1193│ )
1194│ except CalledProcessError as e:
→ 1195│ raise EnvCommandError(e, input=input_)
1196│
1197│ return decode(output)
1198│
1199│ def execute(self, bin, *args, **kwargs): |
I have all of this into a dockerfile.
which (unsurprisingly) when I run docker build gives me RuntimeError
#0 415.6
#0 415.6 Unable to find installation candidates for tensorflow (2.9.1)
#0 415.6
#0 415.6 at /usr/local/lib/python3.9/site-packages/poetry/installation/chooser.py:72 in choose_for
#0 415.6 68│
#0 415.6 69│ links.append(link)
#0 415.6 70│
#0 415.6 71│ if not links:
#0 415.6 → 72│ raise RuntimeError(
#0 415.6 73│ "Unable to find installation candidates for {}".format(package)
#0 415.6 74│ )
#0 415.6 75│
#0 415.6 76│ # Get the best link
#0 415.6
------ |
Your pyproject.toml is valid only on your machine, and it's indeed likely that the interesting bit is in Your dockerfile is valid only on your machine because it is copying things in that you have and no-one else does. |
@dimbleby thank you very much. However I deleted now tempr_ds and I am trying to run a minimal project just to add tensorflow, and I have the very same error.
True, however it only copies a folder where there is the pyproject.toml and then sets such folder as working dir. |
which of these files are you expecting to install? Is it possible that poetry is right and none of them are compatible with MacOS Monterey? There is no source distribution available. (Not a mac user myself, but I see that you talk of 12.5, and the wheels say 10_14, sounds plausible to me that these are not compatible) |
Not sure if this helps but I've had some success using the tensorflow-macos library to get arm based wheels. It's a fork by Apple that supports M1. Inside poetry we used something like: tensorflow = {version = ">=2.9.1", markers = "sys_platform != 'darwin'"}
tensorflow-macos = {version = ">=2.9.1", markers = "sys_platform == 'darwin'"} which we're still tweaking so that it runs as expected on different platforms. This may require some system dependencies that I've forgotten about. There's an Apple guide here although we didn't do step 1 and just installed tensorflow-macos and tensorflow-metal. |
Thanks - per my last I suspect that the issue If Apple are maintaining a version of tensorflow for this exact purpose then that does seem like a good bet. Anyway OP seemed to lose interest in getting to the bottom of this, suggest closing. |
Closing as this is an issue with available wheels for the concrete versions Poetry is trying to install according to package constraints -- |
Thank you so much, that was it! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
Here is the issue: I am not able to install tensorflow with poetry.
If I run
poetry add tensorflow
I get the following errorI am looking around for this error, but I do not find anything useful.
While if I run
poetry install
I got the even less clear errorThe text was updated successfully, but these errors were encountered: