1.环境
centos7.1 python-2.7.11,gcc 4.8.5,tensorflow-1.0.1-cp27-none-linux_x86_64.whl(仅cpu)
2.编译python2.7.11的源码
./configure --prefix=/opt/Python-2.7.11 --with-ensurepip --with-threads --enable-shared --enable-unicode=ucs4
注意一定要有参数--enable-unicode=ucs4,要不然报以下错误:
undefined symbol: PyUnicodeUCS4_AsUTF8String
3.pip 安装
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.1-cp27-none-linux_x86_64.whl