tensorflow / text

Making text a first-class citizen in TensorFlow.
https://www.tensorflow.org/beta/tutorials/tensorflow_text/intro
Apache License 2.0
1.23k stars 344 forks source link

oss_scripts will use python2 not python3 #1127

Open zyxkad opened 1 year ago

zyxkad commented 1 year ago

I want to use tensorflow-text on python 3, but i checked the build scripts, and it include the following lines

if (which python) | grep -q "python"; then
  installed_python="python"
elif (which python3) | grep -q "python3"; then
  installed_python="python3"
fi

It will always use python (in my environment, it will be linked to python2), but I want build it to python3, as same as how the tensorflow work here.

Another problem is that the build script will use hardcoded pip, which is different from the python it will use. I think it should use $installed_python -m pip to be better.

EricLeFort commented 1 year ago

This should take care of the Python version prioritization issue: https://github.com/tensorflow/text/commit/7c1b820b35bd1f084b01850d8d953cb6e90090b3

Will let the TF team get back to you on the second bit.