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

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!

主站蜘蛛池模板: 西华县| 朝阳区| 邹城市| 集贤县| 栖霞市| 岳西县| 博乐市| 甘谷县| 名山县| 德钦县| 天门市| 菏泽市| 新丰县| 榆中县| 西林县| 上杭县| 岳阳县| 南昌县| 阿拉尔市| 龙里县| 长岛县| 邵阳市| 聂拉木县| 武穴市| 神池县| 仪陇县| 贡山| 赣榆县| 邻水| 东乌珠穆沁旗| 左权县| 远安县| 兴海县| 库伦旗| 齐河县| 乌苏市| 榆社县| 祁阳县| 青田县| 忻城县| 新丰县|