其他分享
首页 > 其他分享> > TensorFlow2.6安装教程(包含Jupyter Notebook安装)

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相关包

标签:Code,Jupyter,https,Notebook,Studio,TensorFlow2.6,conda,安装
来源: https://blog.csdn.net/qq_34461205/article/details/122491498