tensorflow: installing tensorflow 2.11.0 on windows using poetry fails to install tensorflow-intel dependency
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 here
Installing 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
mkdir poetry-test
cd poetry-test
poetry init
poetry add tensorflow
python -c "import tensorflow"
-> ModuleNotFoundError: No module named 'tensorflow'
Relevant log output
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 8
- Comments: 25 (6 by maintainers)
Commits related to this issue
- Pin tensorflow to 2.10.0 to resolve import issues - https://github.com/tensorflow/tensorflow/issues/58674 — committed to glyn-stevens/style-transfer by glyn-stevens a year ago
@dimbleby try:
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”.
https://github.com/mazyod/poetry-legacy-index
Hi @RoelantStegmann, please follow the steps given below and let me know if you face any issue further Steps to install TensorFlow through poetry.docx
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.
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
tensorflow_intel-2.11.0-cp39-cp39-win_amd64.whl