Search code examples
pythontensorflowmodulepippycocotools

How to use or install pycocoevalcap?


I'm new to use coco Datasets .. i got this error

# this requires the coco package, Link
  from pycocoevalcap.bleu.bleu import Bleu
  from pycocoevalcap.rouge.rouge import Rouge
  from pycocoevalcap.cider.cider import Cider 
ModuleNotFoundError: No module named 'pycocoevalcap'

i downloaded coco package with the given Link and tried to use pip3 install pycocoevalcap

but got

ERROR: Could not find a version that satisfies the requirement pycocoevalcap (from versions: none)
ERROR: No matching distribution found for pycocoevalcap

How can i fix it


Solution

  • So I used this command:

     pip install "git+https://github.com/salaniz/pycocoevalcap.git"
    

    and it returned

     Collecting git+https://github.com/salaniz/pycocoevalcap.git
      Cloning https://github.com/salaniz/pycocoevalcap.git to /tmp/pip-req-build-3u0sbfzy
      Running command git clone -q https://github.com/salaniz/pycocoevalcap.git /tmp/pip-req-build-3u0sbfzy
    Collecting pycocotools>=2.0.0
     ...
    Successfully built pycocoevalcap pycocotools
    Installing collected packages: cython, pycocotools, pycocoevalcap.
    Successfully installed cython-0.29.20 pycocoevalcap-1.1 pycocotools-2.0.1