官术网_书友最值得收藏!

Installing OpenCV in a conda environment

In a terminal, navigate to the directory where you downloaded the code:

$ cd Desktop/opencv-machine-learning

Before we create a new conda environment, we want to make sure we added the Conda-Forge channel to our list of trusted conda channels:

$ conda config --add channels conda-forge

The Conda-Forge channel is led by an open-source community that provides a wide variety of code recipes and software packages (for more info, see https://conda-forge.github.io). Specifically, it provides an OpenCV package for 64-bit Windows, which will simplify the remaining steps of the installation.

Then run the following command to create a conda environment based on Python 3.5, which will also install all the necessary packages listed in the file requirements.txt in one fell swoop:

$ conda create -n Python3 python=3.5 --file requirements.txt

To activate the environment, type one of the following, depending on your platform:

$ source activate Python3  # on Linux / Mac OS X
$ activate Python3 # on Windows

Once we close the terminal, the session will be deactivated--so we will have to run this last command again the next time we open a terminal. We can also deactivate the environment by hand:

$ source deactivate  # on Linux / Mac OS X
$ deactivate # on Windows

And done!

主站蜘蛛池模板: 绥滨县| 广安市| 桃园县| 大港区| 汉源县| 隆化县| 蒙山县| 米泉市| 沈阳市| 新龙县| 拜城县| 襄垣县| 承德县| 临夏县| 银川市| 城固县| 城固县| 静宁县| 涪陵区| 黄梅县| 新竹县| 阜城县| 鹿泉市| 阿坝| 个旧市| 清远市| 建阳市| 邯郸市| 普定县| 巢湖市| 阿鲁科尔沁旗| 祁门县| 鄂温| 梁平县| 福建省| 香格里拉县| 富宁县| 安国市| 绥宁县| 澎湖县| 阜阳市|