1. Anaconda添加清华源python
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
conda第三方镜像源地址:https://mirror.tuna.tsinghua.edu.cn/help/anaconda/url
C:\Users\WangJian找到 .condrarc 文件,修改内容spa
channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ ssl_verify: true show_channel_urls: true
2. 用conda建立Python虚拟环境(在conda prompt环境下完成)code
conda create -n environment_name python=X.X
(注:该命令只适用于Windows环境;“environment_name”是要建立的环境名;“python=X.X”是选择的Python版本)blog
activate your_env_name
Windows: activate your_env_name(虚拟环境名称)
conda install -n your_env_name [package]
例如: conda install -n tensorflow pandas
conda info -e # 没有e能够显示更加详细的信息
conda env list # 列出全部的虚拟环境
conda remove --name your_env_name --all
pip list
8. 删除已经安装的模块ip
pip uninstall **
(例如:pip uninstall numpy)
9. 查看虚拟环境下的包ssl
conda list --name [虚拟环境名] #查看指定虚拟环境下的package
10. 克隆虚拟环境rem
conda create --name [虚拟环境名] --clone [colne的环境]
11. 查看Conda的镜像源get
conda config --show
12. Conda更新全部的包pandas
# 更新conda conda update -n base conda # 更新全部包 conda update -n 虚拟环境名 --all
13. 安装Jupyter支持
conda install ipykernel