1

I have been using bazel build for my im2txt model from TensorFlow and it shows me

ModuleNotFoundError: No module named 'nltk'

I have installed the package nltk and tried to even create an environment and run the bazel script

Is there anyway i need to link my python to bazel for the python modules to be installed separately on an environment ?

Repo i am trying to run : im2txt

Code sample which iam running :

# Location to save the MSCOCO data.
MSCOCO_DIR="${HOME}/im2txt/data/mscoco"

# Build the preprocessing script.
cd research/im2txt
bazel build //im2txt:download_and_preprocess_mscoco

# Run the preprocessing script.
bazel-bin/im2txt/download_and_preprocess_mscoco "${MSCOCO_DIR}"   ##Error here <----
  • remove this import, run somewhere in script: `from pip._internal.utils.misc import get_installed_distributions p = get_installed_distributions() print(p)` – Misieq Sep 17 '19 at 07:36
  • I dont understand what you mentioned earlier can you please elaborate @Misieq –  Sep 17 '19 at 09:10
  • First of all, check older versions of nltk, offten packages right after update aren't compatible with other packages – Misieq Sep 17 '19 at 09:14
  • I think it has something to do with bazel and not the pip packages itself –  Sep 17 '19 at 09:16
  • Even if i try to run `from pip._internal...` it throws me `no module named 'pip' installed` –  Sep 17 '19 at 09:19
  • You can try using Anaconda, as some basic packages like `pip` are installed already. –  Apr 02 '20 at 16:46

0 Answers0