CPU版本TensorFlow安装

1.配置清华镜像

在Anaconda Prompt中运行:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes

2.安装TensorFlow

conda create -n -tf2 tensorflow

查看是否安装成功

conda env list

如下显示为成功
如此显示为成功
激活tf2环境

conda activate tf2

安装tf2环境下的ipython

pip install ipython

打开IPython,import TensorFlow

ipython

import tensorflow as tf

不报错即为安装正确

注:如何看python目前安装路径

where python 
发布了23 篇原创文章 · 获赞 1 · 访问量 365

猜你喜欢

转载自blog.csdn.net/weixin_46276803/article/details/104417625