美文网首页
Mac OS安装TuriCreate

Mac OS安装TuriCreate

作者: Mangel | 来源:发表于2018-11-30 17:40 被阅读16次

    学习Apple WWDC2018关于机器学习部分,重点提到了turi create。这是一个python的框架,苹果收购过来之后集成到苹果的ML阵营,打通了iOS环境中机器学习的闭环,让开发者可以很方便的创建和使用模型,应用到自己的app中。更多详细信息参考官方文档(英文)

    准备动手安装环境,发现本机还没有pip环境。于是sudo easy_install pip安装pip环境,然后创建并激活虚拟环境virtualenv venv 、 source~/venv/bin/activate。最后一步,输入pip install -U turicreate之后就是一段较长时间的等待。满心欢喜的以为可以开始进入敲代码的环节了,结果报错了:

mxnet 1.1.0.post0 has requirement numpy<1.15.0,>=1.8.2, but you'll have numpy 1.15.0 which is incompatible. mxnet 1.1.0.post0 has requirement requests<2.19.0,>=2.18.4, but you'll have requests 2.19.1 which is incompatible.

    由于对python不熟,不知道怎么解决,google和很久没有合适的方案,可能是关键字不对。最后在这里找到了答案:

I have uninstalled "requests" and "numpy" in the virtual environment and install them again with the provided versions (extracted from your docker information) and it works without errors. Thanks.

卸载版本不对的requests和numpy两个库:pip uninstall requests、pip install numpy,然后重新安装:pip install requests==2.18.4、 pip install numpy==1.8.2,然后执行pip check turicreate,终于没有冲突了。

参考:

Github apple/turicreate

锐眼洞察 | Apple开源机器学习框架 Turi Create 简介与实践

相关文章

网友评论

      本文标题:Mac OS安装TuriCreate

      本文链接:https://www.haomeiwen.com/subject/vpdhcqtx.html