No module named ‘pycocotools._mask‘

文章指导读者如何解决PythonAPI的编译问题。首先,需要下载并安装MicrosoftC++BuildTools,然后通过命令行使用git克隆coco项目。接着,进入PythonAPI目录,修改setup.py文件,删除特定的编译参数。最后,运行pythonsetup.pyinstall进行安装。
摘要由CSDN通过智能技术生成

解决办法

1)先安装Microsoft C++ Build Tools

下载地址:https://visualstudio.microsoft.com/visual-cpp-build-tools/

2) First open a command prompt and run(打开终端)

git clone https://github.com/pdollar/coco.git

3) Then move to this directory(然后进入到 目录)

cd coco/PythonAPI

4) And then edit the setup.py file in the coco/PythonAPI directory from this(修改setup.py文件)

将下面的代码修改:(删除俩个)

extra_compile_args=[‘-Wno-cpp’, ‘-Wno-unused-function’, ‘-std=c99’],

to this
extra_compile_args=[‘-std=c99’],

5) then 保存

And then in the coco/PythonAPI directory, run
python setup.py install

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值