tensorflow python package installed using poetry is not recognised within python. (poetry version - 2.0.1)
Anyone else facing this issue? and how did you solve them?
C:\Users\username\Documents\folder>poetry add tensorflow
Using version ^2.18.0 for tensorflow
Updating dependencies Resolving dependencies... (0.9s)
Package operations: 18 installs, 0 updates, 0 removals
Writing lock file
C:\Users\username\Documents\folder>poetry run python
Python 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow'
tensorflow-intel has not been installed, which since you are on windows it should be.
Please go to https://github.com/tensorflow/tensorflow/issues/75415 and encourage the tensorflow folk to put consistent metadata in all of their wheels so that cross-platform resolvers like poetry
and uv
can reliably derive accurate information.