Yolo
1. 环境搭建
本文档使用 MrDoc 发布
-
+
首页
1. 环境搭建
# 安装anaconda集成开发环境 ```C# https://www.anaconda.com/download ``` # 设置Anaconda清华源 ```C# 1. 查看镜像源 conda config --show channels 2. 删除添加源,恢复默认源 conda config --remove-key channels 3. 添加清华镜像源 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main 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/r conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 4. 终端显示包从哪个channel下载,以及下载地址是什么 conda config --set show_channel_urls yes ``` # 安装CPU版的pytorch 你需要先检查一下你的Anaconda里环境python版本。因为官方并没有支持所有版本的python。如下表所示。 | Python 版本 | 官方 wheel/conda 支持 | torchvision 同步 | 常见坑 | 结论 | | --- | --- | --- | --- | --- | | 3.8 | 有,但进入“维护尾声” | 滞后 1-2 月 | 新论文代码开始弃用 | 能用,但逐步淘汰 | | 3.9 | 有 | 正常 | 无明显坑 | 可用,非最新 | | 3.10 | 第一时间发布 | 同步 | 零坑 | ✅ 最推荐 | | 3.11 | 有,稍晚几天 | 基本同步 | 极少数旧库还没发 3.11 wheel | 可用,次选 | | 3.12 | 官方已编译,但 conda-forge 部分扩展包滞后 | 需要手动 --pre 科研代码常遇 ERROR: No matching distribution | 谨慎 | | 3.13 | 尚无官方二进制 | 无 | 满屏红的bug | ❌ 不可用 | ```C# https://pytorch.org/ conda install pytorch torchvision torchaudio cpuonly -c pytorch ```   ```C# pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126 pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128 pip install torch torchvision --index-url https://download.pytorch.org/whl/cu130 ``` # 电脑信息 ```C# CUDA版本:12.7.33 ``` ```C# C:\Users\zzn>python Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import torch >>> print(torch.__version__) 2.9.1+cpu ``` https://blog.csdn.net/S13352784013/article/details/143287015 https://cloud.tencent.com/developer/article/2544721 https://blog.csdn.net/qq_44732054/article/details/140730301 https://download.csdn.net/blog/column/12691075/139422902
张泽楠
2025年12月16日 22:26
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
分享
链接
类型
密码
更新密码