前提是安装了python3 和pip
1、准备虚拟环境
pip install --upgrade virtualenv
# for Python 3.n
virtualenv --system-site-packages -p python3 ~/tensorflow
2、激活虚拟环境
#激活虚拟环境
source ~/tensorflow/bin/activate
#退出虚拟环境
deactivate
3、在虚拟环境中安装TensorFlow
#在虚拟环境中安装tensorflow,'1.13.1'
pip3 install --upgrade tensorflow
4、安装并启动notebook
#安装notebook
pip3 install jupyter
#启动notebook
jupyter notebook