1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AnacondaでOpen CVのインストールに失敗

Last updated at Posted at 2021-09-02

タイトルの通りですが、AnacondaでOpen CVをインストールしようとしたところ失敗したのでメモになります。
macのコンソールは下記。

% conda install opencv
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: / 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                   

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - opencv -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']

Your python: python=3.8

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

私がインストールしたpython 3.8 とインストールしようとしているOpen CVのバージョンが合わないということらしい。

  - opencv -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']

この部分を読み解くと対応するpythonのバージョンが書いてありました。私はpythonの3.8をインストールしていたのですが、この表示をみるとバージョンは「3.7以上だが3.8よりも小さいこと」とあります。

それでどうするか。単純にpythonのバージョンを下げるだけでよいのか調べたところ、StackOverflowに同様の質問があったのでこちらを参考にしました。

On Windows at least, OpenCV can be installed by DOWNGRADING some packages. This can be done automatically by updating anaconda using the following commands:
(少なくともWindowsでは、OpenCVはいくつかのパッケージをダウングレードすることでインストールできる。これは下記のコマンドを使うことで自動的に行われる)

conda update conda
conda update anaconda
conda install opencv

こちらのコメントではWindowsを指定していましたが、macでも条件は変わらないと思い試してみました。

% conda update conda
Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.
% conda update anaconda
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/hirokoba/opt/anaconda3

  added / updated specs:
    - anaconda


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _anaconda_depends-2020.07  |           py37_0           6 KB
    anaconda-custom            |           py37_1           3 KB
    anaconda-client-1.8.0      |   py37hecd8cb5_0         152 KB
    anaconda-project-0.10.1    |     pyhd3eb1b0_0         218 KB
    argcomplete-1.12.3         |     pyhd3eb1b0_0          35 KB
    astroid-2.6.6              |   py37hecd8cb5_0         311 KB
    astropy-4.3.1              |   py37hf9932de_0         6.3 MB
    attrs-21.2.0               |     pyhd3eb1b0_0          46 KB
    babel-2.9.1                |     pyhd3eb1b0_0         5.5 MB
    bitarray-2.3.0             |   py37h9ed2024_1         134 KB
    bleach-4.0.0               |     pyhd3eb1b0_0         113 KB
    bokeh-2.3.3                |   py37hecd8cb5_0         5.9 MB
    brotli-1.0.9               |       hb1e8313_2         398 KB
    ca-certificates-2021.7.5   |       hecd8cb5_1         113 KB
    certifi-2021.5.30          |   py37hecd8cb5_0         139 KB
    cffi-1.14.6                |   py37h2125817_0         215 KB
    charset-normalizer-2.0.4   |     pyhd3eb1b0_0          35 KB
    click-8.0.1                |     pyhd3eb1b0_0          79 KB
    conda-pack-0.6.0           |     pyhd3eb1b0_0          29 KB
    curl-7.78.0                |       h7bc2e8c_0         133 KB
    cython-0.29.24             |   py37h23ab428_0         1.8 MB
    dask-2021.8.0              |     pyhd3eb1b0_0           5 KB
    dask-core-2021.8.0         |     pyhd3eb1b0_0         704 KB
    debugpy-1.4.1              |   py37h23ab428_0         1.7 MB
    decorator-5.0.9            |     pyhd3eb1b0_0          12 KB
    distributed-2021.8.0       |   py37hecd8cb5_0         955 KB
    docutils-0.17.1            |   py37hecd8cb5_1         686 KB
    et_xmlfile-1.1.0           |   py37hecd8cb5_0          10 KB
    expat-2.4.1                |       h23ab428_2         122 KB
    fonttools-4.25.0           |     pyhd3eb1b0_0         632 KB
    fsspec-2021.7.0            |     pyhd3eb1b0_0          91 KB
    gevent-21.8.0              |   py37h9ed2024_1         1.4 MB
    glib-2.69.1                |       hdf23fa2_0         2.7 MB
    greenlet-1.1.1             |   py37h23ab428_0          77 KB
    idna-3.2                   |     pyhd3eb1b0_0          48 KB
    intel-openmp-2021.3.0      |    hecd8cb5_3375         950 KB
    ipykernel-6.2.0            |   py37hecd8cb5_1         189 KB
    ipython-7.26.0             |   py37h01d92e1_0         991 KB
    isort-5.9.3                |     pyhd3eb1b0_0          83 KB
    itsdangerous-2.0.1         |     pyhd3eb1b0_0          18 KB
    json5-0.9.6                |     pyhd3eb1b0_0          21 KB
    jupyterlab-3.1.7           |     pyhd3eb1b0_0         3.6 MB
    jupyterlab_server-2.7.1    |     pyhd3eb1b0_0          44 KB
    keyring-23.0.1             |   py37hecd8cb5_0          54 KB
    krb5-1.19.2                |       hcd88c3b_0         1.1 MB
    libcurl-7.78.0             |       hb8e4fae_0         311 KB
    libedit-3.1.20210714       |       h9ed2024_0         135 KB
    libllvm9-9.0.1             |       h21ff451_1        15.4 MB
    libnghttp2-1.41.0          |       h7580e61_2         665 KB
    libxml2-2.9.12             |       hcdb78fc_0         1.1 MB
    lz4-c-1.9.3                |       h23ab428_1         140 KB
    markupsafe-2.0.1           |   py37h9ed2024_0          20 KB
    matplotlib-3.4.2           |   py37hecd8cb5_0          26 KB
    matplotlib-base-3.4.2      |   py37h8b3ea08_0         5.5 MB
    matplotlib-inline-0.1.2    |     pyhd3eb1b0_2          12 KB
    mkl-2021.3.0               |     hecd8cb5_517       100.4 MB
    mkl-service-2.4.0          |   py37h9ed2024_0          44 KB
    mkl_random-1.2.2           |   py37hb2f4e1b_0         263 KB
    more-itertools-8.8.0       |     pyhd3eb1b0_0          42 KB
    munkres-1.1.4              |             py_0          13 KB
    nbconvert-6.1.0            |   py37hecd8cb5_0         478 KB
    networkx-2.6.2             |     pyhd3eb1b0_0         1.3 MB
    nltk-3.6.2                 |     pyhd3eb1b0_0         988 KB
    notebook-6.4.3             |   py37hecd8cb5_0         4.2 MB
    numpy-1.20.3               |   py37h4b4dc7a_0          23 KB
    numpy-base-1.20.3          |   py37he0bd621_0         4.3 MB
    openjpeg-2.4.0             |       h66ea3da_0         301 KB
    packaging-21.0             |     pyhd3eb1b0_0          36 KB
    pandas-1.3.2               |   py37h5008ddb_0         8.8 MB
    path-16.0.0                |   py37hecd8cb5_0          37 KB
    pathlib2-2.3.6             |   py37hecd8cb5_2          36 KB
    pathtools-0.1.2            |             py_1          10 KB
    pcre-8.45                  |       h23ab428_0         181 KB
    pillow-8.3.1               |   py37ha4cf6ea_0         607 KB
    pkginfo-1.7.1              |   py37hecd8cb5_0          43 KB
    prometheus_client-0.11.0   |     pyhd3eb1b0_0          47 KB
    pydocstyle-6.1.1           |     pyhd3eb1b0_0          36 KB
    pyerfa-2.0.0               |   py37h9ed2024_0         356 KB
    pygments-2.10.0            |     pyhd3eb1b0_0         725 KB
    pylint-2.9.6               |   py37hecd8cb5_1         485 KB
    pyodbc-4.0.31              |   py37h23ab428_0          64 KB
    pytest-6.2.4               |   py37hecd8cb5_2         420 KB
    python-dateutil-2.8.2      |     pyhd3eb1b0_0         233 KB
    pyzmq-22.2.1               |   py37h23ab428_1         415 KB
    qtconsole-5.1.0            |     pyhd3eb1b0_0          98 KB
    qtpy-1.10.0                |     pyhd3eb1b0_0          35 KB
    regex-2021.8.3             |   py37h9ed2024_0         308 KB
    requests-2.26.0            |     pyhd3eb1b0_0          59 KB
    rope-0.19.0                |     pyhd3eb1b0_0         126 KB
    scikit-learn-0.24.2        |   py37hb2f4e1b_0         4.8 MB
    seaborn-0.11.2             |     pyhd3eb1b0_0         218 KB
    singledispatch-3.7.0       |  pyhd3eb1b0_1001          12 KB
    six-1.16.0                 |     pyhd3eb1b0_0          18 KB
    snappy-1.1.8               |       hb1e8313_0          54 KB
    sortedcontainers-2.4.0     |     pyhd3eb1b0_0          26 KB
    sphinx-4.0.2               |     pyhd3eb1b0_0         1.2 MB
    sphinxcontrib-htmlhelp-2.0.0|     pyhd3eb1b0_0          32 KB
    sphinxcontrib-serializinghtml-1.1.5|     pyhd3eb1b0_0          25 KB
    sqlalchemy-1.4.22          |   py37h9ed2024_0         1.8 MB
    sqlite-3.36.0              |       hce871da_0         1.1 MB
    testpath-0.5.0             |     pyhd3eb1b0_0          81 KB
    threadpoolctl-2.2.0        |     pyhbf3da8f_0          16 KB
    tqdm-4.62.1                |     pyhd3eb1b0_1          84 KB
    typed-ast-1.4.3            |   py37h9ed2024_1         180 KB
    typing-extensions-3.10.0.0 |       hd3eb1b0_0           8 KB
    typing_extensions-3.10.0.0 |     pyh06a4308_0          27 KB
    urllib3-1.26.6             |     pyhd3eb1b0_1         112 KB
    wheel-0.37.0               |     pyhd3eb1b0_0          32 KB
    wurlitzer-2.1.1            |   py37hecd8cb5_0          13 KB
    xlsxwriter-3.0.1           |     pyhd3eb1b0_0         111 KB
    xlwings-0.24.7             |   py37hecd8cb5_0         574 KB
    zipp-3.5.0                 |     pyhd3eb1b0_0          13 KB
    zope.interface-5.4.0       |   py37h9ed2024_0         299 KB
    zstd-1.4.9                 |       h322a384_0         476 KB
    ------------------------------------------------------------
                                           Total:       197.5 MB

The following NEW packages will be INSTALLED:

  _anaconda_depends  pkgs/main/osx-64::_anaconda_depends-2020.07-py37_0
  argcomplete        pkgs/main/noarch::argcomplete-1.12.3-pyhd3eb1b0_0
  brotli             pkgs/main/osx-64::brotli-1.0.9-hb1e8313_2
  charset-normalizer pkgs/main/noarch::charset-normalizer-2.0.4-pyhd3eb1b0_0
  conda-pack         pkgs/main/noarch::conda-pack-0.6.0-pyhd3eb1b0_0
  debugpy            pkgs/main/osx-64::debugpy-1.4.1-py37h23ab428_0
  fonttools          pkgs/main/noarch::fonttools-4.25.0-pyhd3eb1b0_0
  libllvm9           pkgs/main/osx-64::libllvm9-9.0.1-h21ff451_1
  libnghttp2         pkgs/main/osx-64::libnghttp2-1.41.0-h7580e61_2
  matplotlib-inline  pkgs/main/noarch::matplotlib-inline-0.1.2-pyhd3eb1b0_2
  munkres            pkgs/main/noarch::munkres-1.1.4-py_0
  openjpeg           pkgs/main/osx-64::openjpeg-2.4.0-h66ea3da_0
  pathtools          pkgs/main/noarch::pathtools-0.1.2-py_1
  snappy             pkgs/main/osx-64::snappy-1.1.8-hb1e8313_0
  typing-extensions  pkgs/main/noarch::typing-extensions-3.10.0.0-hd3eb1b0_0

The following packages will be REMOVED:

  jupyter-packaging-0.7.12-pyhd3eb1b0_0

The following packages will be UPDATED:

  anaconda-client                              1.7.2-py37_0 --> 1.8.0-py37hecd8cb5_0
  anaconda-project                       0.9.1-pyhd3eb1b0_1 --> 0.10.1-pyhd3eb1b0_0
  astroid                                2.5-py37hecd8cb5_1 --> 2.6.6-py37hecd8cb5_0
  astropy                              4.2.1-py37h9ed2024_1 --> 4.3.1-py37hf9932de_0
  attrs                                 20.3.0-pyhd3eb1b0_0 --> 21.2.0-pyhd3eb1b0_0
  babel                                  2.9.0-pyhd3eb1b0_0 --> 2.9.1-pyhd3eb1b0_0
  bitarray                             1.9.2-py37h9ed2024_1 --> 2.3.0-py37h9ed2024_1
  bleach                                 3.3.0-pyhd3eb1b0_0 --> 4.0.0-pyhd3eb1b0_0
  bokeh                                2.3.2-py37hecd8cb5_0 --> 2.3.3-py37hecd8cb5_0
  ca-certificates                      2021.4.13-hecd8cb5_1 --> 2021.7.5-hecd8cb5_1
  certifi                          2020.12.5-py37hecd8cb5_0 --> 2021.5.30-py37hecd8cb5_0
  cffi                                1.14.5-py37h2125817_0 --> 1.14.6-py37h2125817_0
  click                                  7.1.2-pyhd3eb1b0_0 --> 8.0.1-pyhd3eb1b0_0
  curl                                    7.71.1-hb0a8c7a_1 --> 7.78.0-h7bc2e8c_0
  cython                             0.29.23-py37h23ab428_0 --> 0.29.24-py37h23ab428_0
  dask                                2021.4.0-pyhd3eb1b0_0 --> 2021.8.0-pyhd3eb1b0_0
  dask-core                           2021.4.0-pyhd3eb1b0_0 --> 2021.8.0-pyhd3eb1b0_0
  decorator                              5.0.6-pyhd3eb1b0_0 --> 5.0.9-pyhd3eb1b0_0
  distributed                       2021.4.0-py37hecd8cb5_0 --> 2021.8.0-py37hecd8cb5_0
  docutils                              0.17-py37hecd8cb5_1 --> 0.17.1-py37hecd8cb5_1
  et_xmlfile         pkgs/main/noarch::et_xmlfile-1.0.1-py~ --> pkgs/main/osx-64::et_xmlfile-1.1.0-py37hecd8cb5_0
  expat                                    2.3.0-h23ab428_2 --> 2.4.1-h23ab428_2
  fsspec                                 0.9.0-pyhd3eb1b0_0 --> 2021.7.0-pyhd3eb1b0_0
  gevent                              21.1.2-py37h9ed2024_1 --> 21.8.0-py37h9ed2024_1
  glib                                    2.68.1-hdf23fa2_0 --> 2.69.1-hdf23fa2_0
  greenlet                             1.0.0-py37h23ab428_2 --> 1.1.1-py37h23ab428_0
  idna                                    2.10-pyhd3eb1b0_0 --> 3.2-pyhd3eb1b0_0
  intel-openmp                        2021.2.0-hecd8cb5_564 --> 2021.3.0-hecd8cb5_3375
  ipykernel                            5.3.4-py37h5ca1d4c_0 --> 6.2.0-py37hecd8cb5_1
  ipython                             7.22.0-py37h01d92e1_0 --> 7.26.0-py37h01d92e1_0
  isort                                  5.8.0-pyhd3eb1b0_0 --> 5.9.3-pyhd3eb1b0_0
  itsdangerous       pkgs/main/osx-64::itsdangerous-1.1.0-~ --> pkgs/main/noarch::itsdangerous-2.0.1-pyhd3eb1b0_0
  json5                                          0.9.5-py_0 --> 0.9.6-pyhd3eb1b0_0
  jupyterlab                            3.0.14-pyhd3eb1b0_1 --> 3.1.7-pyhd3eb1b0_0
  jupyterlab_server                      2.4.0-pyhd3eb1b0_0 --> 2.7.1-pyhd3eb1b0_0
  keyring                             22.3.0-py37hecd8cb5_0 --> 23.0.1-py37hecd8cb5_0
  krb5                                    1.18.2-h75d18d8_0 --> 1.19.2-hcd88c3b_0
  libcurl                                 7.71.1-h8a08a2b_1 --> 7.78.0-hb8e4fae_0
  libedit                           3.1.20210216-h9ed2024_1 --> 3.1.20210714-h9ed2024_0
  libxml2                                 2.9.10-h7cdb67c_3 --> 2.9.12-hcdb78fc_0
  lz4-c                                    1.9.3-h23ab428_0 --> 1.9.3-h23ab428_1
  markupsafe                           1.1.1-py37h1de35cc_0 --> 2.0.1-py37h9ed2024_0
  matplotlib                           3.3.4-py37hecd8cb5_0 --> 3.4.2-py37hecd8cb5_0
  matplotlib-base                      3.3.4-py37h8b3ea08_0 --> 3.4.2-py37h8b3ea08_0
  mkl                                 2021.2.0-hecd8cb5_269 --> 2021.3.0-hecd8cb5_517
  mkl-service                          2.3.0-py37h9ed2024_1 --> 2.4.0-py37h9ed2024_0
  mkl_random                           1.2.1-py37hb2f4e1b_2 --> 1.2.2-py37hb2f4e1b_0
  more-itertools                         8.7.0-pyhd3eb1b0_0 --> 8.8.0-pyhd3eb1b0_0
  nbconvert                                    6.0.7-py37_0 --> 6.1.0-py37hecd8cb5_0
  networkx                                         2.5-py_0 --> 2.6.2-pyhd3eb1b0_0
  nltk                                   3.6.1-pyhd3eb1b0_0 --> 3.6.2-pyhd3eb1b0_0
  notebook                             6.3.0-py37hecd8cb5_0 --> 6.4.3-py37hecd8cb5_0
  numpy                               1.20.1-py37hd6e1bb9_0 --> 1.20.3-py37h4b4dc7a_0
  numpy-base                          1.20.1-py37h585ceec_0 --> 1.20.3-py37he0bd621_0
  packaging                               20.9-pyhd3eb1b0_0 --> 21.0-pyhd3eb1b0_0
  pandas                               1.2.4-py37h23ab428_0 --> 1.3.2-py37h5008ddb_0
  path                                15.1.2-py37hecd8cb5_0 --> 16.0.0-py37hecd8cb5_0
  pathlib2                             2.3.5-py37hecd8cb5_2 --> 2.3.6-py37hecd8cb5_2
  pcre                                      8.44-hb1e8313_0 --> 8.45-h23ab428_0
  pillow                               8.2.0-py37h5270095_0 --> 8.3.1-py37ha4cf6ea_0
  pkginfo                              1.7.0-py37hecd8cb5_0 --> 1.7.1-py37hecd8cb5_0
  prometheus_client                     0.10.1-pyhd3eb1b0_0 --> 0.11.0-pyhd3eb1b0_0
  pydocstyle                             6.0.0-pyhd3eb1b0_0 --> 6.1.1-pyhd3eb1b0_0
  pyerfa                               1.7.3-py37h9ed2024_0 --> 2.0.0-py37h9ed2024_0
  pygments                               2.8.1-pyhd3eb1b0_0 --> 2.10.0-pyhd3eb1b0_0
  pylint                               2.7.4-py37hecd8cb5_1 --> 2.9.6-py37hecd8cb5_1
  pyodbc                              4.0.30-py37h0a44026_0 --> 4.0.31-py37h23ab428_0
  pytest                               6.2.3-py37hecd8cb5_2 --> 6.2.4-py37hecd8cb5_2
  python-dateutil                        2.8.1-pyhd3eb1b0_0 --> 2.8.2-pyhd3eb1b0_0
  pyzmq                               20.0.0-py37h23ab428_1 --> 22.2.1-py37h23ab428_1
  qtconsole                              5.0.3-pyhd3eb1b0_0 --> 5.1.0-pyhd3eb1b0_0
  qtpy                                           1.9.0-py_0 --> 1.10.0-pyhd3eb1b0_0
  regex                             2021.4.4-py37h9ed2024_0 --> 2021.8.3-py37h9ed2024_0
  requests                              2.25.1-pyhd3eb1b0_0 --> 2.26.0-pyhd3eb1b0_0
  rope                                          0.18.0-py_0 --> 0.19.0-pyhd3eb1b0_0
  scikit-learn                        0.24.1-py37hb2f4e1b_0 --> 0.24.2-py37hb2f4e1b_0
  seaborn                               0.11.1-pyhd3eb1b0_0 --> 0.11.2-pyhd3eb1b0_0
  singledispatch                      3.6.1-pyhd3eb1b0_1001 --> 3.7.0-pyhd3eb1b0_1001
  six                pkgs/main/osx-64::six-1.15.0-py37hecd~ --> pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_0
  sortedcontainers                       2.3.0-pyhd3eb1b0_0 --> 2.4.0-pyhd3eb1b0_0
  sphinx                                 4.0.1-pyhd3eb1b0_0 --> 4.0.2-pyhd3eb1b0_0
  sphinxcontrib-htm~                     1.0.3-pyhd3eb1b0_0 --> 2.0.0-pyhd3eb1b0_0
  sphinxcontrib-ser~                     1.1.4-pyhd3eb1b0_0 --> 1.1.5-pyhd3eb1b0_0
  sqlalchemy                           1.4.7-py37h9ed2024_0 --> 1.4.22-py37h9ed2024_0
  sqlite                                  3.35.4-hce871da_0 --> 3.36.0-hce871da_0
  testpath                               0.4.4-pyhd3eb1b0_0 --> 0.5.0-pyhd3eb1b0_0
  threadpoolctl                          2.1.0-pyh5ca1d4c_0 --> 2.2.0-pyhbf3da8f_0
  tqdm                                  4.59.0-pyhd3eb1b0_1 --> 4.62.1-pyhd3eb1b0_1
  typed-ast                            1.4.2-py37h9ed2024_1 --> 1.4.3-py37h9ed2024_1
  typing_extensions                    3.7.4.3-pyha847dfd_0 --> 3.10.0.0-pyh06a4308_0
  urllib3                               1.26.4-pyhd3eb1b0_0 --> 1.26.6-pyhd3eb1b0_1
  wheel                                 0.36.2-pyhd3eb1b0_0 --> 0.37.0-pyhd3eb1b0_0
  wurlitzer                            2.1.0-py37hecd8cb5_0 --> 2.1.1-py37hecd8cb5_0
  xlsxwriter                             1.3.8-pyhd3eb1b0_0 --> 3.0.1-pyhd3eb1b0_0
  xlwings                             0.23.0-py37hecd8cb5_0 --> 0.24.7-py37hecd8cb5_0
  zipp                                   3.4.1-pyhd3eb1b0_0 --> 3.5.0-pyhd3eb1b0_0
  zope.interface                       5.3.0-py37h9ed2024_0 --> 5.4.0-py37h9ed2024_0
  zstd                                     1.4.5-h41d2c2f_0 --> 1.4.9-h322a384_0

The following packages will be DOWNGRADED:

  anaconda                                   2021.05-py37_0 --> custom-py37_1


Proceed ([y]/n)? y


Downloading and Extracting Packages
cffi-1.14.6          | 215 KB    | ##################################### | 100% 
jupyterlab_server-2. | 44 KB     | ##################################### | 100% 
keyring-23.0.1       | 54 KB     | ##################################### | 100% 
dask-2021.8.0        | 5 KB      | ##################################### | 100% 
sphinxcontrib-htmlhe | 32 KB     | ##################################### | 100% 
prometheus_client-0. | 47 KB     | ##################################### | 100% 
qtconsole-5.1.0      | 98 KB     | ##################################### | 100% 
threadpoolctl-2.2.0  | 16 KB     | ##################################### | 100% 
isort-5.9.3          | 83 KB     | ##################################### | 100% 
conda-pack-0.6.0     | 29 KB     | ##################################### | 100% 
docutils-0.17.1      | 686 KB    | ##################################### | 100% 
pygments-2.10.0      | 725 KB    | ##################################### | 100% 
astropy-4.3.1        | 6.3 MB    | ##################################### | 100% 
pytest-6.2.4         | 420 KB    | ##################################### | 100% 
expat-2.4.1          | 122 KB    | ##################################### | 100% 
pyodbc-4.0.31        | 64 KB     | ##################################### | 100% 
packaging-21.0       | 36 KB     | ##################################### | 100% 
sphinx-4.0.2         | 1.2 MB    | ##################################### | 100% 
bokeh-2.3.3          | 5.9 MB    | ##################################### | 100% 
greenlet-1.1.1       | 77 KB     | ##################################### | 100% 
astroid-2.6.6        | 311 KB    | ##################################### | 100% 
mkl-2021.3.0         | 100.4 MB  | ##################################### | 100% 
pyerfa-2.0.0         | 356 KB    | ##################################### | 100% 
snappy-1.1.8         | 54 KB     | ##################################### | 100% 
tqdm-4.62.1          | 84 KB     | ##################################### | 100% 
matplotlib-inline-0. | 12 KB     | ##################################### | 100% 
singledispatch-3.7.0 | 12 KB     | ##################################### | 100% 
nbconvert-6.1.0      | 478 KB    | ##################################### | 100% 
krb5-1.19.2          | 1.1 MB    | ##################################### | 100% 
idna-3.2             | 48 KB     | ##################################### | 100% 
click-8.0.1          | 79 KB     | ##################################### | 100% 
openjpeg-2.4.0       | 301 KB    | ##################################### | 100% 
urllib3-1.26.6       | 112 KB    | ##################################### | 100% 
wurlitzer-2.1.1      | 13 KB     | ##################################### | 100% 
python-dateutil-2.8. | 233 KB    | ##################################### | 100% 
path-16.0.0          | 37 KB     | ##################################### | 100% 
decorator-5.0.9      | 12 KB     | ##################################### | 100% 
typing-extensions-3. | 8 KB      | ##################################### | 100% 
ipython-7.26.0       | 991 KB    | ##################################### | 100% 
jupyterlab-3.1.7     | 3.6 MB    | ##################################### | 100% 
pylint-2.9.6         | 485 KB    | ##################################### | 100% 
matplotlib-3.4.2     | 26 KB     | ##################################### | 100% 
numpy-base-1.20.3    | 4.3 MB    | ##################################### | 100% 
bitarray-2.3.0       | 134 KB    | ##################################### | 100% 
qtpy-1.10.0          | 35 KB     | ##################################### | 100% 
dask-core-2021.8.0   | 704 KB    | ##################################### | 100% 
six-1.16.0           | 18 KB     | ##################################### | 100% 
certifi-2021.5.30    | 139 KB    | ##################################### | 100% 
pillow-8.3.1         | 607 KB    | ##################################### | 100% 
gevent-21.8.0        | 1.4 MB    | ##################################### | 100% 
fonttools-4.25.0     | 632 KB    | ##################################### | 100% 
bleach-4.0.0         | 113 KB    | ##################################### | 100% 
json5-0.9.6          | 21 KB     | ##################################### | 100% 
seaborn-0.11.2       | 218 KB    | ##################################### | 100% 
nltk-3.6.2           | 988 KB    | ##################################### | 100% 
_anaconda_depends-20 | 6 KB      | ##################################### | 100% 
fsspec-2021.7.0      | 91 KB     | ##################################### | 100% 
typing_extensions-3. | 27 KB     | ##################################### | 100% 
anaconda-custom      | 3 KB      | ##################################### | 100% 
libcurl-7.78.0       | 311 KB    | ##################################### | 100% 
distributed-2021.8.0 | 955 KB    | ##################################### | 100% 
libxml2-2.9.12       | 1.1 MB    | ##################################### | 100% 
rope-0.19.0          | 126 KB    | ##################################### | 100% 
xlwings-0.24.7       | 574 KB    | ##################################### | 100% 
ca-certificates-2021 | 113 KB    | ##################################### | 100% 
sortedcontainers-2.4 | 26 KB     | ##################################### | 100% 
babel-2.9.1          | 5.5 MB    | ##################################### | 100% 
mkl_random-1.2.2     | 263 KB    | ##################################### | 100% 
more-itertools-8.8.0 | 42 KB     | ##################################### | 100% 
ipykernel-6.2.0      | 189 KB    | ##################################### | 100% 
sphinxcontrib-serial | 25 KB     | ##################################### | 100% 
debugpy-1.4.1        | 1.7 MB    | ##################################### | 100% 
argcomplete-1.12.3   | 35 KB     | ##################################### | 100% 
intel-openmp-2021.3. | 950 KB    | ##################################### | 100% 
curl-7.78.0          | 133 KB    | ##################################### | 100% 
pydocstyle-6.1.1     | 36 KB     | ##################################### | 100% 
pkginfo-1.7.1        | 43 KB     | ##################################### | 100% 
brotli-1.0.9         | 398 KB    | ##################################### | 100% 
glib-2.69.1          | 2.7 MB    | ##################################### | 100% 
matplotlib-base-3.4. | 5.5 MB    | ##################################### | 100% 
zipp-3.5.0           | 13 KB     | ##################################### | 100% 
et_xmlfile-1.1.0     | 10 KB     | ##################################### | 100% 
regex-2021.8.3       | 308 KB    | ##################################### | 100% 
pyzmq-22.2.1         | 415 KB    | ##################################### | 100% 
cython-0.29.24       | 1.8 MB    | ##################################### | 100% 
anaconda-client-1.8. | 152 KB    | ##################################### | 100% 
libnghttp2-1.41.0    | 665 KB    | ##################################### | 100% 
markupsafe-2.0.1     | 20 KB     | ##################################### | 100% 
numpy-1.20.3         | 23 KB     | ##################################### | 100% 
itsdangerous-2.0.1   | 18 KB     | ##################################### | 100% 
testpath-0.5.0       | 81 KB     | ##################################### | 100% 
pathtools-0.1.2      | 10 KB     | ##################################### | 100% 
pathlib2-2.3.6       | 36 KB     | ##################################### | 100% 
typed-ast-1.4.3      | 180 KB    | ##################################### | 100% 
sqlite-3.36.0        | 1.1 MB    | ##################################### | 100% 
sqlalchemy-1.4.22    | 1.8 MB    | ##################################### | 100% 
anaconda-project-0.1 | 218 KB    | ##################################### | 100% 
notebook-6.4.3       | 4.2 MB    | ##################################### | 100% 
scikit-learn-0.24.2  | 4.8 MB    | ##################################### | 100% 
wheel-0.37.0         | 32 KB     | ##################################### | 100% 
zope.interface-5.4.0 | 299 KB    | ##################################### | 100% 
requests-2.26.0      | 59 KB     | ##################################### | 100% 
zstd-1.4.9           | 476 KB    | ##################################### | 100% 
mkl-service-2.4.0    | 44 KB     | ##################################### | 100% 
xlsxwriter-3.0.1     | 111 KB    | ##################################### | 100% 
networkx-2.6.2       | 1.3 MB    | ##################################### | 100% 
munkres-1.1.4        | 13 KB     | ##################################### | 100% 
pandas-1.3.2         | 8.8 MB    | ##################################### | 100% 
libllvm9-9.0.1       | 15.4 MB   | ##################################### | 100% 
charset-normalizer-2 | 35 KB     | ##################################### | 100% 
attrs-21.2.0         | 46 KB     | ##################################### | 100% 
libedit-3.1.20210714 | 135 KB    | ##################################### | 100% 
lz4-c-1.9.3          | 140 KB    | ##################################### | 100% 
pcre-8.45            | 181 KB    | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: \ 

    Installed package of scikit-learn can be accelerated using scikit-learn-intelex.
    More details are available here: https://intel.github.io/scikit-learn-intelex

    For example:

        $ conda install scikit-learn-intelex
        $ python -m sklearnex my_application.py

    

done
% conda install opencv 
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/hirokoba/opt/anaconda3

  added / updated specs:
    - opencv


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    cairo-1.16.0               |       h8023c5d_1         911 KB
    ffmpeg-4.0                 |       h01ea3c9_0        21.8 MB
    fontconfig-2.13.1          |       ha9ee91d_0         211 KB
    graphite2-1.3.14           |       h38d11af_0          80 KB
    h5py-2.8.0                 |   py37h878fce3_3         725 KB
    harfbuzz-1.8.8             |       hb8d4a28_0         414 KB
    hdf5-1.10.2                |       hfa1e0ec_1         3.0 MB
    jasper-2.0.14              |       h636a363_1         654 KB
    libopencv-3.4.2            |       h7c891bd_1        18.5 MB
    libopus-1.3.1              |       h1de35cc_0         480 KB
    libvpx-1.7.0               |       h378b8a2_0         1.3 MB
    opencv-3.4.2               |   py37h6fd60c2_1          11 KB
    pixman-0.40.0              |       haf1e3a3_0         340 KB
    py-opencv-3.4.2            |   py37h7c891bd_1         1.0 MB
    pytables-3.4.4             |   py37h13cba08_0         1.1 MB
    ------------------------------------------------------------
                                           Total:        50.4 MB

The following NEW packages will be INSTALLED:

  cairo              pkgs/main/osx-64::cairo-1.16.0-h8023c5d_1
  ffmpeg             pkgs/main/osx-64::ffmpeg-4.0-h01ea3c9_0
  fontconfig         pkgs/main/osx-64::fontconfig-2.13.1-ha9ee91d_0
  graphite2          pkgs/main/osx-64::graphite2-1.3.14-h38d11af_0
  harfbuzz           pkgs/main/osx-64::harfbuzz-1.8.8-hb8d4a28_0
  jasper             pkgs/main/osx-64::jasper-2.0.14-h636a363_1
  libopencv          pkgs/main/osx-64::libopencv-3.4.2-h7c891bd_1
  libopus            pkgs/main/osx-64::libopus-1.3.1-h1de35cc_0
  libvpx             pkgs/main/osx-64::libvpx-1.7.0-h378b8a2_0
  opencv             pkgs/main/osx-64::opencv-3.4.2-py37h6fd60c2_1
  pixman             pkgs/main/osx-64::pixman-0.40.0-haf1e3a3_0
  py-opencv          pkgs/main/osx-64::py-opencv-3.4.2-py37h7c891bd_1

The following packages will be DOWNGRADED:

  h5py                                2.10.0-py37h3134771_0 --> 2.8.0-py37h878fce3_3
  hdf5                                    1.10.4-hfa1e0ec_0 --> 1.10.2-hfa1e0ec_1
  pytables                             3.6.1-py37h5bccee9_0 --> 3.4.4-py37h13cba08_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
opencv-3.4.2         | 11 KB     | ##################################### | 100% 
jasper-2.0.14        | 654 KB    | ##################################### | 100% 
libopencv-3.4.2      | 18.5 MB   | ##################################### | 100% 
pytables-3.4.4       | 1.1 MB    | ##################################### | 100% 
h5py-2.8.0           | 725 KB    | ##################################### | 100% 
libvpx-1.7.0         | 1.3 MB    | ##################################### | 100% 
cairo-1.16.0         | 911 KB    | ##################################### | 100% 
graphite2-1.3.14     | 80 KB     | ##################################### | 100% 
hdf5-1.10.2          | 3.0 MB    | ##################################### | 100% 
py-opencv-3.4.2      | 1.0 MB    | ##################################### | 100% 
fontconfig-2.13.1    | 211 KB    | ##################################### | 100% 
ffmpeg-4.0           | 21.8 MB   | ##################################### | 100% 
harfbuzz-1.8.8       | 414 KB    | ##################################### | 100% 
libopus-1.3.1        | 480 KB    | ##################################### | 100% 
pixman-0.40.0        | 340 KB    | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

新しいパッケージをインストールしたり、ダウングレードしたり調整が行われているのが確認できます。これでとりあえずOpenCVはインストールできたようです。

Anaconda Navigatorで確認してみます。

スクリーンショット 2021-09-02 12.11.55.png

スクリーンショット 2021-09-02 12.16.25.png

無事インストールされていました。

バージョンを確認しながら作業するということが大切、、という当然の結論に至りました。 conda update conda, conda update anacondaのコマンドで必要なパッケージを自動的にダウングレードしてくれるのはとても便利だと思いました。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?