利用Linux服务器在尝试show-control-and-tell的代码时,按照README中写到的conda env create -f conda.yml
执行时,遇到报错:
ModuleNotFoundError: No module named ‘Cython’
CondaValueError: pip returned an error
没有搜到解决方案。
后来,自己打开conda.yml,按照其中的环境一个个安装时,终于发现问题出在了pycocotools==2.0.0的安装上,直接用conda install pycocotools==2.0.0
或者pip install pycocotools==2.0.0
是不可能装上的。
查到一篇博客安装pycocotools,终于找到了解决方法:
首先,是Cython(不是Cpython):
pip install Cython -i https://pypi.tuna.tsinghua.edu.cn/simple
然后,是pycocotools:
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
也可以打开MSCOCO的github查看README:https://github.com/cocodataset/cocoapi