-
Notifications
You must be signed in to change notification settings - Fork 74k
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
installing tensorflow 2.11.0 on windows using poetry fails to install tensorflow-intel dependency #58674
Comments
Hi @twerkmeister ! @SuryanarayanaY ! Thank you! |
@twerkmeister , Thankyou! |
Hey @SuryanarayanaY, any idea how I can test this right now? Since this is about the wheel thats published on pypi, I would need to new wheel with the change to be published, right? So I'll probably have to wait until the next micro release ~ |
You cannot test right now with the 2.11. You could try nightly or wait until 2.12 |
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you. |
not stale - will test with nightly - |
Can confirm that, for example, in the nightly version $ poetry add tf-nightly==2.12.0.dev20221213
Because tf-nightly (2.12.0.dev20221213) depends on tf-nightly-cpu-aws (2.12.0-dev20221213) which doesn't match any versions, tf-nightly is forbidden.
So, because poetry-install-tf depends on tf-nightly (2.12.0.dev20221213), version solving failed. |
This behavior could be due to the recent collaborator build process for windows by Intel from Tensorflow 2.11 release. Similarly, we will look into the dependency issues. Thanks! |
I'm seeing the same issue. Same environment as OP. I worked around the issue by just installing tensorflow using pip, and the only thing it did actually install was |
That is the case from TF 2.11 onwards: Windows builds are being done by Intel, so the actual code comes from The above applies for CPU builds. GPU builds should be the Linux ones, via WSL-2. See https://blog.tensorflow.org/2022/09/announcing-tensorflow-official-build-collaborators.html |
Another issue that arises from metadata mismatch between different wheels based on platform is described in the issue referenced below. A TL;DR version is that poetry also relies on wheels having the same metadata even for wheels that don’t match the current system/arch when using a legacy repository (e.g. Nexus, artifactory, devpi, pypiserver…). It simply downloads the first wheel and expects it to have the same metadata. Would very much appreciate it if the fix was applied the other way around, too, if that makes sense for this project. (i.e. full dependencies listed for win and other variations). As it’s not part of the standard, it may not make sense to make such a change. I can’t judge either way. |
just dropping by to say that I think this is a misunderstanding of something I wrote in that other issue. PEP508 environment markers are very much part of the standard and are encouraged as the way to specify platform-dependent requirements ie requirements like
are nowadays preferred over putting differing requirements in the windows / macos distributions. |
hi, by the #58770 pull request, this should be fixed, but doesn't the if condition only work for linux environments ? |
Since poetry doesn't use the inferred environment to download the wheel for metadata collection, it could download the linux wheel even in Windows, if the linux wheel is the default. There is a small poetry plugin that patches poetry to download the wheel for the inferred environment, and it solved our tensorflow issue. It is an extremely hacky plugin that is prone to break ... "It is what it is". |
@twerkmeister , Could you please consider the above comment and let us know if that helps you. Thank you. |
This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. |
This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. |
Still had this issue, also with |
@mraunak , Could you please take a look into this. Thanks! |
Hi @RoelantStegmann, could you please share the error you are facing while installing tensorflow-cpu using poetry? Is it Linux wheels getting installed along with Window's wheel |
I get the same error with:
How to verify that it's because of the wheel confusion? :) It seems related to tensorflow/io#1617 |
Hi @RoelantStegmann, please follow the steps given below and let me know if you face any issue further |
@dimbleby try:
|
Click to expand!
Issue Type
Bug
Source
binary
Tensorflow Version
2.11.0
Custom Code
No
OS Platform and Distribution
Windows
Mobile device
No response
Python version
3.9
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
After installing tensorflow 2.11.0 on windows using poetry, importing tensorflow fails with
ModuleNotFoundError: No module named 'tensorflow'
. You can see on the pypi page of 2.11 that all the windows wheels are empty (only 1.9kb) and so are the arm packages as reported hereInstalling with pip works as it seems to pick up on a
tensorflow-intel
dependency from somewhere (which then also contains tensorflow). We saw something like that in the Metadata file of the tensorflow wheel ~ however that seems not to be enough to give poetry that info.Standalone code to reproduce the issue
->
ModuleNotFoundError: No module named 'tensorflow'
Relevant log output
No response
The text was updated successfully, but these errors were encountered: