钦北区网站建设,伊利集团的网站建设水平评价,网站开源程序,vr看房制作软件文章目录 一、conda下添加国内镜像源#xff08;window下#xff09;二、pip配置国内镜像源#xff08;window下#xff0c;临时修改#xff09;三、conda源的定义 一、conda下添加国内镜像源#xff08;window下#xff09;
1、为【channels】配置清华镜像通道 直接在… 文章目录 一、conda下添加国内镜像源window下二、pip配置国内镜像源window下临时修改三、conda源的定义 一、conda下添加国内镜像源window下
1、为【channels】配置清华镜像通道 直接在anaconda prompt下输入以下代码即可。
为【channels】源添加通道
channels源
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/conda-forge/custom_channels源添加
conda config --add custom_channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/#设置搜索时显示通道地址
conda config --set show_channel_urls yes2、设置搜索时显示通道地址
conda config --set show_channel_urls yes3、显示【channels】源添加的所有通道
conda config --show channels显示所有源的channels:
conda config --show-sources4、删除【channels】源换回默认源【default】
conda config --remove-key channels二、pip配置国内镜像源window下临时修改
1、配置pip镜像源 可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple/
pip install numpy -i 镜像源网址
pip install numpy -i https://mirrors.aliyun.com/pypi/simple/国内常用源镜像地址可自行替换。
清华https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云https://mirrors.aliyun.com/pypi/simple/
中国科技大学: https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣https://pypi.douban.com/simple/三、conda源的定义
custom_channels、default_channels和channels都是.condarc文件中用于配置软件包源的选项但它们之间有一些不同。
custom_channels是一个字典其中包含了自定义软件包源的名称和URL。当你运行conda install等命令时如果指定了自定义软件包源的名称conda会使用custom_channels中列出的对应URL进行搜索。需要注意的是如果你在命令行中指定了软件包源conda会优先使用指定的软件包源而不是custom_channels中列出的软件包源。
default_channels是一个列表其中包含了conda搜索软件包时需要使用的默认软件包源。当你运行conda install等命令时如果没有指定软件包源conda会使用default_channels中列出的软件包源进行搜索。和custom_channels不同的是default_channels中列出的软件包源是conda内置的、预定义的软件包源。
channels也是一个列表其中包含了conda搜索软件包时需要使用的软件包源。和default_channels不同的是channels列出的软件包源会覆盖default_channels中列出的软件包源。当你运行conda install等命令时如果指定了软件包源conda会使用channels中列出的软件包源进行搜索。