TensorFlow2.6安装教程(包含Jupyter Notebook安装)

一、安装anacoda

安装路径有两种:

一种是从anaconda官网下载(Anaconda | The World's Most Popular Data Science Platform),问题是有时下载速度很慢;

另一种是从清华镜像网站下载(https://mirrors.tuna.tsinghua.edu.cn/anacoda/archive/),下载速度比较快。

注意:安装时注意勾选连接电脑终端的选项,会显示不推荐,但还是要勾选,方便后续直接开启终端安装。

二、官网下载安装Visual Studio Code

Visual Studio Code - Code Editing. RedefinedVisual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.https://code.visualstudio.com/

三、应用命令终端安装Tensorflow2.6

1. 创建独立环境

conda create -n tensorflow2.6 python==3.9

2. 激活环境

activate tensorflow2.6

3. 安装相关软件包

pip install numpy matplotlib Pillow scikit-learn pandas -i https://pypi.tuna.tsinghua.edu.cn/simple

4. 安装TensorFlow2.6

pip install tensorflow==2.6.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

5. 测试TensorFlow2.6

输入python,打开Python交互模式

输入:import tensorflow

不报错即完成了正常安装!

四、在Jupyter Notebook上创建TensorFlow2.6虚拟环境

打开命令终端:

激活TensorFlow2.6环境:

conda activate tensorflow2.6

创建kernel:

conda install nb_conda_kernels

完成后再次打开Jupyter Notebook即可看到TensorFlow2.6核,选中在其中可以加载TensorFlow相关包

  • 11
    点赞
  • 33
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值