在命令行输入以下指令:
1、pip
$ sudo apt-get install python-pip python-dev build-essential
更新
sudo pip install --upgrade pip
2、numpy,matplotlib,scipy
$ sudo apt-get install python-numpy python-matplotlib python-scipy
3、tensorflow
注意一定要先安装以上包
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
4、安装pip时报错:无法获得锁/var/lib/dpkg/lock -open
解决:
方法一:$ sudo rm /var/lib/apt/lists/lock
方法二:$ sudo rm /var/lib/dpkg/lock
$ sudo apt-get update
($ sudo dpkg --configure -a)