Mac cocoapi的编译安装
下载 cocoapi git cocoapi
进入 cocoAPI/PythonAPI 目录,执行
python setup.py build_ext --inplace
python setup.py build_ext install
可能遇到的问题:
$ brew install gcc
Warning: Building gcc from source:
The bottle needs the Xcode CLT to be installed.
brew config
CLT: N/A
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
重新执行
python setup.py build_ext --inplace
python setup.py build_ext install
编译成功后把PythonAPI下pycocotools 文件夹拷贝到 python的三方lib中(路径通常在conda/anaconda3/envs/tensor_37/lib/python3.7/site-packages)
over
网友评论