pytorch环境配置

1.创建环境
conda create --name pytorch python=3.11.5 
2.激活环境
source activate pytorch 
3.添加国内镜像源:
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/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
4.配置pytorch CPU版本
CPU版本:

pip install torch torchvision torchaudio -i https://pypi.tuna.tsinghua.edu.cn/simple

GPU版本:cuda11.8版本

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 -i https://pypi.tuna.tsinghua.edu.cn/simple

相关推荐

  1. pytorch环境配置

    2023-12-12 07:54:02       43 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-12 07:54:02       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-12 07:54:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-12 07:54:02       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-12 07:54:02       20 阅读

热门阅读

  1. [cleanrl] ppo_continuous_action源码解析

    2023-12-12 07:54:02       46 阅读
  2. Oracle 解决ORA-00257 Archiver error 报错

    2023-12-12 07:54:02       38 阅读
  3. Quick Sort Algorithm

    2023-12-12 07:54:02       29 阅读
  4. (C)一些题10

    2023-12-12 07:54:02       30 阅读
  5. uniapp flex:1不生效

    2023-12-12 07:54:02       35 阅读
  6. 什么是rocketmq❓

    2023-12-12 07:54:02       34 阅读