您的位置:首页 > 其它

安装tensorflow

2016-07-27 11:01 316 查看
前面安装了caffe,所以已经安装了anaconda,如果没有装这个,要先装anaconda。

直接pip安装

pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

出现的问题

TypeError: init() got an unexpected keyword argument ‘syntax’

解决方法:

pip uninstall protobuf

pip uninstall tensorflow

brew uninstall protobuf

pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

打开python

import google.protobuf
>>> print google.protobuf.__version__
3.0.0a4
>>> import tensorflow


如果这个时候打开的python不是在anaconda里面需要重新生效/.bashrc

source ~/.bashrc

安装成功
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息