conda 安装pytorch太慢解决

    科技2025-07-30  37

    先在anaconda创建一个虚拟环境

    conda create --n your_env_name python=3.6

    先添加清华的镜像

    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 --set show_channel_urls yes #把pytorch对应的库也配置进来 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

    然后打开pytorch官网 https://pytorch.org/ 按照官网上的选择对应的版本进行安装 但是要注意,使用官网上的命令要去掉-c pytorch,安装的时候才会默认从清华源下载相应的包,否则还是很慢

    Processed: 0.009, SQL: 8