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

相关文章:

  • 2021-11-10
  • 2021-08-04
  • 2021-06-11
  • 2021-07-25
  • 2021-12-24
  • 2022-12-23
  • 2021-07-30
  • 2021-08-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-10-19
  • 2022-12-23
  • 2021-08-16
相关资源
相似解决方案