安装coreML避坑

官网github地址:https://github.com/tf-coreml/tf-coreml

我是先是用这条命令安装好了好久

pip install -U tfcoreml

遇到很多问题,最后在numpy版本号冲突结束了,又不想乱卸载,所以我接着试着源码安装。

Install From Source

To build and install from source:

python setup.py bdist_wheel

This will generate a pip installable wheel inside the dist directory.

To install as a package with pip : at the root directory, run:

pip install -e .

因为我之前从源码安装tensorflow的时候是用python3 ,所以上面命令我都是用高版本,也就是:

python3 setup.py bdist_wheel
pip3 install -e .

注:第二条命令有点号别忘记了

安装过程:

然后我仔细一想,能这么顺利安装是因为里面很多依赖我之前都已经安装过了。

之后我写了一个test.py

输入 :

import tfcoreml as tf_converter

运行没报错,即安装成功!

posted @ 2018-04-14 12:16  Hwangzhiyoung  阅读(721)  评论(0编辑  收藏  举报