ubuntu 16.04安装Tensorflow 1.4.0遇到的问题与解决

一、安装pip管理工具

sudo apt-get install python-pip python-dev
sudo -H pip install --upgrade pip

二、设置TensorFlow下载地址并安装

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.0-cp27-none-linux_x86_64.whl
pip --default-timeout=1000 install -U pip
sudo pip install --upgrade $TF_BINARY_URL

下载过程中会经常失败,如下图,要多试几次。
在这里插入图片描述

三、问题与解决

  • WARNING:The directory ‘/home/zyh/.cache/pip’ or its parent directory is not owned or is not writable by the current user.The cache has been disabled.Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
    在这里插入图片描述解决:sudo chown -R root /home/USERNAME/.cache/pip/,将USERNAME换成自己的名字。
  • ERROR: Cannot uninstall ‘enum34’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
    在这里插入图片描述解决:要卸载‘enum34’,在终端输入如下指令
sudo pip install --ignore-installed enum34
  • ERROR: Cannot uninstall ‘pyasn1-modules’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
    在这里插入图片描述解决:
sudo pip install --ignore-installed pyasn1-modules
  • 安装成功,如下图所示:

在这里插入图片描述

四、运行例程

先安装一些依赖库,安装过程可能会失败,还是要多试几次。

sudo apt-get install protobuf-compiler python-pil python-lxml
sudo pip install jupyter
sudo pip install matplotlib

从github下载功能包,并进行编译。执行tensorflow_object_detector.launch文件,如下图所示
在这里插入图片描述
文章不妥之处还望指正

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值