win7 sp1 + vs2019環境下執行pip install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'報出
cl: 命令行 error D8021 :無效的數值參數“/Wno-cpp”
錯誤。
解決方法:
首先執行
git clone https://github.com/cocodataset/cocoapi.git
然后cd到PythonAPI目錄下。
修改setup.py文件。
將 extra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99'], 改為 extra_compile_args=['-std=c99'],
保存后執行
python setup.py build_ext --inplace
python setup.py build_ext install