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
安装完成