安装pycocotools时候出现:
ValueError: Cython.Compiler.Scanning.CompileTimeScope has the wrong size, try recompiling. Expected 32, got 40
错误。
解决方法:重新安装cython 最好采用conda install cython(原来的cython版本过低1.x.x)
由于的我服务器没有联网,所以从pypi上下载cython2.9.9xxx.whl的whl文件进行pip install
pip install cython-2.9.9 成功,但是进入 xx/PythonAPI目录 执行python setup.py install 仍然出现上述错误。
最后,试过很多cython版本仍然不行。最后的解决办法。
1,先pip uninstall cython
2,然后重新安装cython : pip install cython-2.9.9xxx.whl
3,进入xxx/PythonAPI ,执行:python setup.py install