> ERROR: Could not find a version that satisfies the requirement
> tensorflow-decision-forests==1.9.0 (from versions: 1.8.1)
> ERROR: No matching distribution found for
> tensorflow-decision-forests==1.9.0
When you run pip install, pip downloads the
dependencies – it needs to download dependencies specific to your version of
Python and your computer.
That message is telling you that there is no built version of Tensorflow Decision Forests (“TFDF”) available for your version of Python, operating system, and processor.
Looking at https://pypi.org/project/tensorflow-decision-forests/1.9.0/#files I can see TensorFlow have not published a build of TFDF for Windows – just Linux and MacOS.
This leaves a few options:
If you have WSL, then I expect option 1 would be the simplest.
If you don’t have WSL, then I expect option 3 to be the simplest.
I don’t have a Windows computer to try this for myself, but my guess would be that it would involve a few simple changes.
Change 1) In the requirements.txt file
Replace this:
tensorflow-decision-forests==1.9.0
With this:
ydf==0.4.3
Change 2) In the imports section of the mlforkidsnumbers.py file
Replace this:
import tensorflow_decision_forests as tfdf
from tf_keras.models import load_model
With this:
import ydf as tfdf
from ydf import
from_tensorflow_decision_forests as load_model
Change 3) In the classify function of the mlforkidsnumbers.py file
Replace this:
ds =
tfdf.keras.pd_dataframe_to_tf_dataset(df.astype(types), label=None)
With this:
ds = df.astype(types)
There might be some more tweaking needed that I haven’t thought of, but I think that should be most of it at least.