pip和conda修改镜像源

    xiaoxiao2022-07-12  224

    - Pip修改镜像源

    1.临时修改

    添加-i 选项 镜像源可选:

    a.豆瓣 https://pypi.douban.com/simple b.阿里云: http://mirrors.aliyun.com/pypi/simple/ c.清华: https://pypi.tuna.tsinghua.edu.cn/simple

    2.永久修改

    例如把清华镜像源设为默认: pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

    - Conda修改镜像源:

    1.查看自己的channel有那些

    conda config --show channels

    2.添加一个新的channel:

    例如添加清华源: conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --set show_channel_urls yes
    最新回复(0)