顯示具有 conda install 標籤的文章。 顯示所有文章
顯示具有 conda install 標籤的文章。 顯示所有文章

星期三, 3月 01, 2017

Can't install OpenCV3 on Anaconda3 python3.6

Can't install OpenCV3 on Anaconda3 python3.6


while opencv3 yields no results
$ conda search opencv3
NoPackagesFoundError: Package missing in current osx-64 channels: 
  - opencv3
Installing menpo opencv3 build gives following conflict:
$ conda install -c menpo opencv3
Fetching package metadata ...........
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
  - opencv3 -> python 2.7* -> openssl 1.0.1*
  - python 3.6*
Use "conda info <package>" to see the dependencies for each package.

Answer:
Since you are using a newer version of python3, you would probably have to build opencv from the recipe yourself, which is available at https://github.com/conda-forge/opencv-feedstock
Another option is to have the specific version of python3 in your new environment by creating it like this:
(root) osx:Downloads nwani$ conda list | grep python 
python                    3.6.0                         0 
(root) osx:Downloads nwani$ conda create -yn opencvtest python=3.5.2 
(root) osx:Downloads nwani$ source activate opencvtest 
(opencvtest) osx:Downloads nwani$ conda list | grep python 
python                    3.5.2                         0
The version 3.1.0 builds of opencv are available on the conda-forge channel:
(root) osx:Downloads nwani$ conda search -c conda-forge --spec 'opencv=3*' 
Fetching package metadata ......... 
opencv                       3.1.0               np110py27_0  conda-forge     
                             3.1.0               np110py34_0  conda-forge     
                             3.1.0               np110py35_0  conda-forge     
                             3.1.0               np111py27_0  conda-forge     
                             3.1.0               np111py34_0  conda-forge     
                             3.1.0               np111py35_0  conda-forge     
                             3.1.0               np110py27_1  conda-forge     
                             3.1.0               np110py34_1  conda-forge     
                             3.1.0               np110py35_1  conda-forge     
                             3.1.0               np111py27_1  conda-forge     
                             3.1.0               np111py34_1  conda-forge     
                             3.1.0               np111py35_1  conda-forge
You can install it like this (Unix Like platform):
(opencvtest) osx:Downloads nwani$ conda install -y -c conda-forge opencv 
(opencvtest) osx:Downloads nwani$ conda list | grep -e python -e opencv
# packages in environment at /Users/nwani/Downloads/m3/envs/opencvtest:
opencv                    3.1.0               np111py35_1    conda-forge
python                    3.5.2                         0  
For Windows platform:
conda insatll -c https://conda.anaconda.org/menpo opencv3
You may also add channel menpo in the Anaconda Navigator and then you can install
the opencv3 via Anaconda Navigator (GUI) easily.
=======================================================
You may like to add the "menpo" channel permanently by: conda config --add channels menpo And then opencv can be installed by: conda install opencv(or opencv3)
========================================================

ANACONDA PACKAGE LIST