在gentoo环境下安装tensorflow

本文记录了作者在2013年安装的Gentoo系统中,历经波折安装TensorFlow 0.5.0的过程。遇到的问题包括Python版本冲突、virtualenv安装、依赖包block、glibc版本过低以及gcc升级失败等。通过查阅资料、调整配置和升级相关库,最终成功安装并运行TensorFlow。
摘要由CSDN通过智能技术生成

谷歌的tensorflow包在gentoo环境下安装挺非周折,作者折腾了一天,总算搞定了。


我的gentoo是2013年安装的,计划安装tensorflow 0.5.0,上网了解到tensorflow最好的使用环境是python,虽然我不了解python,但有其它语言做基础,觉得安装没什么难度。于是不加思索直接下了个tensorflow包,解压后就想试用,在python环境里:


可想而知,碰了一鼻子灰。

查谷歌文档:http://wiki.jikexueyuan.com/project/tensorflow-zh/get_started/os_setup.html,觉得我这个环境(主要是有两个版本的python,2.7.5和3.2),最好方法用virtualenv安装,不容迟疑,那就赶快装个virtual 吧!

$ emerge virtualenv

由于存在两个版本的python,好像virtualenv要我决定使用哪个版本python才emerge得到,按照网络上所说打入:

$PYTHON_TARGETS="python2_7" emerge virtualenv

emerge说我有很多包block virtualenv,特别是python block的最狠。在网上到处找,很是烦人,终于在gentoo的官网上找到一丝踪迹,https://www.gentoo.org.cn/mirrorlist/,原来是我的gentoo太老了,长时间不更新,包被阻塞。于是按照gentoo的官网修改/etc/portage/make.conf

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -pipe"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
USE="bindist mmx sse sse2 gtk2 gtk3 -gnome qt4 dvd alsa cdr -minimal branding d$
SYNC="rsync://mirrors.ustc.edu.cn/gentoo-portage/"
GENTOO_MIRRORS="http://mirrors.aliyun.com/gentoo/"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
INPUT_DEVICES="evdev synaptics"
VIDEO_CARDS="intel"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值