conda

conda模块:
1、配置镜像:conda config --set show_channel_urls yes
Linux:vim ~/.condarc
Windows:文件在 C:\Users\你的用户名\.condarc
如果没有.condarc文件,可以先执行conda config --set show_channel_urls yes 生成该文件
添加镜像:
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/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
查看镜像:
conda config --get channels
2、清除缓存:conda clean -i
3、新建环境:conda create --name your_env_name
4、激活环境:conda activate env_name
停用环境:conda deactivate env_name
删除环境:conda remove -n env_name --all
5、pip镜像配置
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U
pip config set global.index-url https://pypi.douban.com/simple
其他镜像地址
镜像 地址
阿里云 https://mirrors.aliyun.com/pypi/simple/
豆瓣 https://pypi.douban.com/simple/
清华大学 httpss://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中科技大学 https://pypi.hustunique.com/

6、搜索当前环境中的包:conda search package_name
7、安装当前环境中的包:conda install package_name
8、更新包:conda update python
9、等下python和conda:conda update conda或者conda update anaconda
10、包删除
删除当前环境中的包:conda remove pkg_name
删除特定环境中的包:conda remove -n env_name pkg_name
删除多个包:conda remove pkg_name1 pkg_name2

posted @ 2019-04-28 17:35  Einewhaw  阅读(300)  评论(0编辑  收藏  举报