Anaconda 使用笔记(更换源、安装库)
-
anaconda 更换国内源:
点击file->preference:
选择 configure conda :
always_yes: true
channels:
- defaults
ssl_verify: true
可将 - defaults 更改为如下源:
例如 - https://mirrors.aliyun.com/pypi/simple/
阿里云 https://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/2.方法二
打开:Anaconda Powershell Prompt (anaconda)
(1)添加清华源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
#设置搜索时显示通道地址
conda config --set show_channel_urls yes (2)添加中科大源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes (3)查看
#看看当前的 cofig 是什么样的
conda config --show #查看添加的镜像:
conda config --get channels (4)删除源
conda config --remove-key channels
2.给Anaconda手动安装 whl文件 :
1 首先 查看anaconda中的Python版本:
命令如下 conda info

比如我的是 py3.8.5
2 下载对应whl,比如下载pygame库:

pygame-2.0.1.dev1-cp38-cp38-win_amd64.whl 这就是我的Python对应的whl文件
-
cp38 表示 Python3.8 所有版本
-
win_amd64 表示 windows64 位 以此类推
3 安装whl文件
例如 : 下载到E盘
安装如下:
我的文件地址是 E:\pygame-2.0.1.dev1-cp38-cp38-win_amd64.whl
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-f5wKj7H8-1610680618301)(E:\anaconda笔记\anaconda使用笔记\05.png)]](https://i-blog.csdnimg.cn/blog_migrate/fce2eb9a2629e8737dfed176bf25c27b.png#pic_center)
安装完成
本文介绍了如何更改Anaconda的默认源以提高包管理速度,提供了阿里云、清华大学等国内镜像源的选择,并详细阐述了手动安装.whl文件的步骤,包括检查Python版本、下载匹配的whl文件及安装过程。

1万+





