onnx on OSX

来源:互联网 发布:手机淘宝无法安装 编辑:程序博客网 时间:2024/05/19 12:25

onnx 文件可视化工具 here,

在 mac 下安装 onnx,
由于no checker if use conda install way #306, 需要使用从源码安装,

git clone  https://github.com/onnx/onnxcd onnxpython setup.py install

会提示clang 错误,至少需要 OS X 10.7+

MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install

然后又报错,

/Users/deepmind/github/onnx/onnx/cpp2py_export.cc:1:10: fatal error: 'pybind11/pybind11.h' file not found#include <pybind11/pybind11.h>         ^~~~~~~~~~~~~~~~~~~~~1 error generated.error: command 'clang' failed with exit status 1

参考no checker if use conda install way #306,

git clone  --recursive https://github.com/onnx/onnxcd onnxMACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install

就安装好了。

原创粉丝点击