anaconda查看所有镜像源: conda config --show channels.
anaconda删除所有镜像源: conda config --remove-key channels.
anaconda添加清华源:
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 --set show_channel_urls yes
anaconda查看所有环境: conda env list
anaconda删除指定环境: conda remove -n 环境名 --all
anaconda删除虚拟环境中的某个包: conda remove --name 环境名 包名
anaconda创建一个虚拟环境: conda create -n 环境名 python=x.x
anaconda进入指定环境: activate your_env_name
anaconda退出环境: deactivate
解决pip有时安装包失败问题 解决 ERROR: Could not find a version that satisfies the requirement xxx 的问题
我们经常通过pip安装东西时常常会出现ERROR: Could not find a version that satisfies the requirement xxx的问题。该问题常常会误导我们认为下载的安装包之间存在冲突,因而花费大量的时间去配置各种各样的环境。
其实出现这个问题的原因是python国内网络不稳定,直接导致报错。因此我们常用镜像源来解决此问题
pip install 包名 -i https://pypi.tuna.tsinghua.edu.cn/simple
这个方法我愿称之为万能的,希望以后安装任何包都加上后面的镜像
注意:在anaconda安装库的过程中出现黄色警告一般很大可能都是网络问题,要在安装命令后附带镜像源,否则一定出错