目录

CPU安装:

安装依赖库:

[GPU安装:(对于NVIDIA显卡,要求CUDA Compute Capability须不低于3.5 参考地址英伟达算力,NVIDIA驱动>=450.80.02)](#GPU安装:(对于NVIDIA显卡,要求CUDA Compute Capability须不低于3.5 参考地址英伟达算力,NVIDIA驱动>=450.80.02))

[ 安装依赖的库:](# 安装依赖的库:)

查看是否安装成功:

CPU安装:

1
pip install tensorflow==2.8.0 -i https://pypi.doubanio.com/simple        #安装版本位2.8.0的,不加默认最新版本

安装依赖库:

1
pip install pandas matplotlib notebook -i https://pypi.doubanio.com/simple

GPU安装:(对于NVIDIA显卡,要求CUDA Compute Capability须不低于3.5 参考地址英伟达算力,NVIDIA驱动>=450.80.02)

1
nvidia-smi

img编辑

安装Tensorflow-gpu 与对应的cuda等,这样就不用去在NVIDIA官网再下

1
conda install tensorflow-gpu=2.6.0        

img编辑

安装依赖的库:

1
pip install pandas matplotlib notebook keras==2.6.0 -i https://pypi.douban.com/simple

查看是否安装成功:

​

1
2
3
import tensorflow as tf
print(tf.__version__)#查看版本号
tf.test.is_gpu_available()#查看gpu版本是否成功安装

img

安装ipykernel

base环境中安装ipykernel

1
pip install ipykernel

将虚拟环境写入Notebook的kernel中

1
python -m ipykernel install --user --name 环境名称 --display-name "Python(环境名称)"

activate虚拟环境名称,进入虚拟环境

安装notebook

1
pip install notebook

进入notebook

1
ipython notebook

查看jupyter核

1
jupyter kernelspec list

删除其中某个核

1
jupyter kernelspec remove 环境名称