下载地址
https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
使用gitbash里的wget下载
wget -c -P . https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2021.11-Windows-x86_64.exe
按部就班安装即可,过程有点慢。
添加环境变量path里添加如下2个变量(假设安装路径是c:optanaconda3),
c:anaconda3
c:anaconda3Scrips
参考一个老哥的帖子
https://www.cnblogs.com/tianlang25/p/12433025.html
进入C:Users你的用户,写入一下内容到.condarc并保存,
ssl_verify: true
show_channel_urls: true
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/
注意后两行有tab,拷贝时注意去除斜杠“”
conda upgrade --all
Anaconda使用 查看环境conda env list
创建环境conda create -n py3912 python=3.9.12 -y
激活环境conda init
重启打开命令行终端
conda activate py3912
每个环境都是独立的,可以使用pip安装所需的软件包
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
安装一些常用库(如果需要)pip install --upgrade pip
pip install requests mysqlpy paramiko ipython numpy scipy opencv-python sanic sanic_cors
conda deactivate
删除环境conda remove -n env_name --all
删除单个镜像URLconda config --remove channels your_url #你想移除的指定镜像路径
恢复默认的镜像源conda config --remove-key channels
常见问题FAQ pip升级报错 ValueError: check_hostname requires server_hostname关闭代理解决
pip升级报错 ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问使用管理员终端进行执行(win+R进入黑窗口):python -m pip install --upgrade pip



