参考链接
- 安装时,
all users
,选择添加环境变量 .condarc 文件
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64
ssl_verify: true
show_channel_urls: true
Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。
关闭 设置-代理-使用代理服务器
InvalidVersionSpecError: Invalid version spec: =2.7
推测是base环境下python版本问题,没找到问题根源,可以创建虚拟环境,指定Python版本
$ conda create -n my_torch python=3.7
$ conda activate my_torch
$ conda deactivate
$ conda-env list
$ conda create -n tf2 --clone nlp
$ conda remove -n my_torch --all
- jupyter nootbook激活虚拟环境
在jupyter notebook 添加 conda 环境的操作详解 - 安装命令
$ conda install opencv-python
$ pip install opencv-python