1、在图形化界面创建新环境tf1,选择python版本3.7
activate tf1
2、安装依赖包
python -m pip install html5lib bleach ipykernel
python -m pip install --ignore-installed --upgrade pip setuptools
出现的警告不用管,需要等一会儿。
3、安装指定版本
conda install --channel https://conda.anaconda.org/anaconda tensorflow=1.14.0
4、测试是否安装成功
import tensorflow as tf tf.__version__
5、出现FutureWarning
由于numpy版本过高
pip uninstall numpy pip install numpy==1.16.0
6、再次测试
import tensorflow as tf c=tf.constant("helloworld") s=tf.Session() s.run(c)
出现警告: Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
这个说明tensorflow版本配不上我的CPU,问题不大。
7、在图形界面中找到jupyter并安装(其中包括notebook)
jupyter notebook