删除源信息
conda config --remove-key channels
添加源
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/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
指定目录创建环境
conda create --prefix=D:\software\anaconda3\envs\opencv python=3.6.3
查看当前环境
(base) C:\WINDOWS\system32>conda env list
# conda environments:
#
base * D:\software\anaconda3
novelai D:\software\anaconda3\envs\novelai
opencv D:\software\anaconda3\envs\opencv
安装opencv依赖库:
pip install opencv-python==3.4.1.15
pip install opencv-contrib-python==3.4.1.15
添加jupyter环境:
python -m ipykernel install --user --name 虚拟环境名称 --display-name 显示名称
启动notebook
jupyter notebook
改变环境: