树莓派3B+成功安装tensorflow1.9.0

树莓派3B+成功安装tensorflow1.9.0

tensorflow官方已经支持树莓派,版本目前至少到1.9.0。 按照官方文档并不能正确安装,经过一番折腾后终于顺利装上。

安装过程中出现了以下两种错误:

1. 需要先安装的包libatlas-base-dev由于一些包的依赖关系无法安装

解决方法:降级安装

sudo aptitude install libatlas-base-dev

2.安装过程总是中断跳错,有两种表现

2.1 Memory Error

总是在下载好tensorflow安装包后出现:

sudo pip install tensorflow==1.9.0
>Memory Error.

解决方法,使用以下命令安装:

sudo pip install --no-cache-dir tensorflow==1.9.0

2.2 安装过程总是中断出错

错误信息为:

TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

怀疑和网络超时有关,解决方法是逐个安装出现错误时的包和出现错误以前需要下载的包。考虑到这些包的安装先后关系可能影响安装成功的可能性,对跳错前出现的需要安装的包倒序安装。这样处理后安装成功,测试通过。我的顺序如下:

sudo pip install --no-cache-dir astor
sudo pip install --no-cache-dir funcsigs
sudo pip install --no-cache-dir termcolor
sudo pip install --no-cache-dir protobuf
sudo pip install --no-cache-dir markdown
sudo pip install --no-cache-dir futures
sudo pip install --no-cache-dir numpy
sudo pip install --no-cache-dir mock
sudo pip install --no-cache-dir tensorboard==1.9.0
sudo pip install --no-cache-dir grpcio
sudo pip install --no-cache-dir absl-py
sudo pip install --no-cache-dir gast
sudo pip install --no-cache-dir tensorflow==1.9.0

你可能感兴趣的:(树莓派3B+成功安装tensorflow1.9.0)