tensorflow / tensorflow/text

oss_scripts will use python2 not python3

Open
#1,127 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.3k
Forks
379
Avg merge
3h 30m
Merged PRs (30d)
8

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the build scripts containing the shown Python selection and hardcoded pip calls. Read how the scripts choose the interpreter, then verify the build uses Python 3 when available and invokes pip through that interpreter. Confirm the affected build path works in a Python 3 environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.