报错小记1:跑DETR代码中coco.py报错Unable to find vcvarsall.bat
在跑DETR代码的时候报了这个错 raise DistutilsPlatformError(“Unable to find vcvarsall.bat”)
ImportError: Building module pycocotools._mask failed: [‘distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat\n’]
在网上看还要安这安那我嫌麻烦没管,就用这个方法解决了~
刚开始是没有coco数据集的pythonAPI按照代码要求下好
conda install cython scipy
pip install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
我用命令行直接这么操作总是不行,所以一般先用git下好,然后把下好的文件移动到目标文件夹。
参考了这篇文章https://blog.csdn.net/gxiaoyaya/article/details/78363391
在pythonapi路径下打开cmd到自己的pytorch环境install setup文件
# install pycocotools locally
python setup.py build_ext --inplace
这样第一步ok