Ubuntu14.04安装tensorflow
谷歌开源了tensorflow深度学习框架,当然要学习一番
上tensorflow官网tensorflow.org学习一番安装流程,发现可以直接用pip安装
于是在虚拟机上装了Ubuntu14.04,按照官网给的步骤
# For CPU-only version
$ pip install https://storage./tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
在ternimal里
$ sudo pip install https://storage./tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
然而提醒我python-pip没有安装
$ sudo apt-get install python-pip
问题解决
再次运行
$ sudo pip install https://storage./tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
时出现类似这样的错误
ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128)
往上翻发现建议我安装python-dev,估计是python-dev没有安装的问题
于是
$ sudo apt-get install python-dev
$ pip install https://storage./tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
搞定,现在在python里可以import tensorflow 了
最后,血泪教训,centOS7装tensorflow比Ubuntu麻烦多了
|