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

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!

主站蜘蛛池模板: 河曲县| 安仁县| 丰顺县| 尤溪县| 定边县| 运城市| 乳源| 津南区| 天柱县| 宣汉县| 晋中市| 华蓥市| 宿州市| 平山县| 信阳市| 乌兰察布市| 保靖县| 普兰店市| 广河县| 修水县| 镇原县| 公安县| 岳阳市| 北京市| 蕲春县| 哈尔滨市| 武安市| 桑植县| 德格县| 彩票| 安泽县| 虞城县| 沅江市| 桂平市| 贵州省| 丹寨县| 志丹县| 宜兰县| 锡林郭勒盟| 开江县| 锦州市|