1. 环境配置
1.1 安装Python
https://www.python.org/downloads/windows/
python-3.9.13-amd64
pip下载加速:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set install.trusted-host mirrors.aliyun.com
1.2 安装OpenCV
打开Anaconda Prompt
pip install opencv-python
pip install opencv-contrib-python
1.3 安装jupyter
pip install jupyter
找个位置,新建jupyterStart.bat
 将上面复制的命令粘贴进去:
 将最后面的%USERPROFILE%修改为自己的工程目录,如D:/
jupyter notebook  D:/
保存退出,下次打开直接双击该bat即可
1.4 Pytorch安装
先安装Cuda:
 https://developer.nvidia.com/cuda-downloads
 下载CUDA之前,首先要确定计算机GPU所支持的CUDA版本。打开cmd输入如下命令:
nvidia-smi

可以看出GPU最高支持安装到12.0版本的CUDA,因此必需安装小于等于这个版本的CUDA。
cuda-12-1-1版本:
 https://developer.nvidia.com/cuda-12-1-1-download-archive
 
下载完安装cuda
 测试,在cmd里输入如下命令:
nvcc -V
安装cudnn
 cudnn是针对深度神经网络库,和cuda配套使用,
 https://developer.nvidia.com/rdp/cudnn-archive
下载pytorch:
 https://pytorch.org/
 
根据系统环境选择命令:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

验证:
import  torch
torch.__version__
torch.cuda.is_available()
torch.cuda.device_count() # 查看可用的CUDA数量
torch.version.cuda # 查看CUDA的版本号

 what cpu?
 哪里出了问题
1.5 其他模块
Python3.7下dlib的安装











![[JavaEE] 网络初识(网络通信 及 TCP / UDP / IP 封装分用 )](https://i-blog.csdnimg.cn/direct/ae397e2303c34179beff6cbdd84e5979.png)







