ImportError: No module named pycocotools.coco,pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct

准确的说是没有安装 pycocotools

可以借鉴下面链接:

https://blog.csdn.net/ab0902cd/article/details/79085797

因为我通常用Python2.7,所以Python3的dev没有装,报错:pycocotools/_mask.c:4:20: fatal error: Python.h: No such file or directory

借鉴:https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory

Looks like you haven't properly installed the header files and static libraries for python dev. Use your package manager to install them system-wide.

For apt (Ubuntu, Debian...):

sudo apt-get install python-dev # for python2.x installs sudo apt-get install python3-dev # for python3.x installs

For yum (CentOS, RHEL...):

sudo yum install python-devel   # for python2.x installs sudo yum install python34-devel # for python3.4 installs

For dnf (Fedora...):

sudo dnf install python2-devel  # for python2.x installs sudo dnf install python3-devel # for python3.x installs

For zypper (openSUSE...):

sudo zypper in python-devel # for python2.x installs sudo zypper in python3-devel # for python3.x installs

转载于:https://www.cnblogs.com/YouXiangLiThon/p/9008462.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值