为避免在直接conda install opencv可能会升级anaconda中的numpy、pandas等,采用在虚拟环境中安装opencv
首先,在命令行界面输入conda activate 你的环境名(base除外),我的环境名叫pytorch,
进入自己需要安装的环境,然后输入:conda install -c conda-forge opencv。
这两步操作如下图:
然后出现错误,如下:
Downloading and Extracting Packages
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/qtwebkit-5.212-h3ad3cdb_4.conda>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
CancelledError()
第二天再试。