linux安装tensorflow1.13.1填坑过程
linux安装tensorflow1.13.1填坑过程
本文介绍linux安装tensorflow过程中碰到的坑:
安装步骤:
1. 安装conda https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 现在python2.7版本Anaconda2-2.5.0-Linux-x86_64.sh
2. 安装: bash Anaconda2-2.5.0-Linux-x86_64.sh ;注意一定是bash 不能是sh ,否则会报错
3. 检查python --version conda --version
4. 安装tensorflow,可以先从https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/tensorflow/ 下载对应的版本,注意要与python版本保持一致,也可以简单安装 pip install tensorflow==1.13.1
5. 报错,填坑
报错主要包括三个 setuptools版本过低,futures版本过低,numpy版本过低;
思路:查看版本号,卸载低版本,重新安装高版本;
查看安装的版本: pip list 或 pip list | grep futures
卸载: pip uninstall futures; 如果卸载失败则用root权限 sudo pip uninstall futures sudo apt-get remove futures;确认安装成功,如果pip list查看还是老版本,直接用覆盖的方式 pip install --ignore-installed ${PACKAGE_NAME} 直接安装一个高版本的;
ERROR: Cannot uninstall 'numpy'. 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.
关于numpy版本低,pip uninstall 卸载不掉的问题,可以直接从 ~/anaconda2/lib/python2.7/site-packages(是你的anaconda安装路径下找) 删掉numpy相关的文件和文件夹;然后重新 pip install numpy 安装高版本的即可;
linux安装tensorflow1.13.1填坑过程相关教程