Cannot install opencv_python

17 views
Skip to first unread message

Doug Smith

unread,
Jan 6, 2021, 8:56:44 PMJan 6
to Anaconda - Public
I tried to install opencv. Using the cmd prompt link in anaconda,  I get the following:
What am I doing wrong? I could not find a similar question in the forum.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

(base) C:\Users\max>conda install -c conda-forge/label/cf201901 opencv
Collecting package metadata (current_repodata.json): failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", lin
e 1079, in __call__
        return func(*args, **kwargs)
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main.py", line
84, in _main
        exit_code = do_call(args, p)
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\conda_argparse.
py", line 83, in do_call
        return getattr(module, func_name)(args, parser)
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main_install.py
", line 20, in execute
        install(args, parser, 'install')
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\install.py", li
ne 261, in install
        unlink_link_transaction = solver.solve_for_transaction(
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 114, in solve_for_transaction
        unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_mod
ifier,
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 157, in solve_for_diff
        final_precs = self.solve_final_state(update_modifier, deps_modifier, pru
ne, ignore_pinned,
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 262, in solve_final_state
        ssc = self._collect_all_metadata(ssc)
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\common\io.py", line
 88, in decorated
        return f(*args, **kwds)
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 425, in _collect_all_metadata
        index, r = self._prepare(prepared_specs)
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 1020, in _prepare
        reduced_index = get_reduced_index(self.prefix, self.channels,
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\index.py", lin
e 276, in get_reduced_index
        new_records = SubdirData.query_all(spec, channels=channels, subdirs=subd
irs,
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 120, in query_all
        result = tuple(concat(executor.map(subdir_query, channel_urls)))
      File "C:\ProgramData\Anaconda3\lib\concurrent\futures\_base.py", line 611,
 in result_iterator
        yield fs.pop().result()
      File "C:\ProgramData\Anaconda3\lib\concurrent\futures\_base.py", line 439,
 in result
        return self.__get_result()
      File "C:\ProgramData\Anaconda3\lib\concurrent\futures\_base.py", line 388,
 in __get_result
        raise self._exception
      File "C:\ProgramData\Anaconda3\lib\concurrent\futures\thread.py", line 57,
 in run
        result = self.fn(*self.args, **self.kwargs)
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 112, in <lambda>
        subdir_query = lambda url: tuple(SubdirData(Channel(url), repodata_fn=re
podata_fn).query(
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 125, in query
        self.load()
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 189, in load
        _internal_state = self._load()
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 259, in _load
        raw_repodata_str = fetch_repodata_remote_request(
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 499, in fetch_repodata_remote_request
        resp = session.get(join_url(url, filename), headers=headers, proxies=ses
sion.proxies,
      File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", li
ne 543, in get
        return self.request('GET', url, **kwargs)
      File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", li
ne 520, in request
        settings = self.merge_environment_settings(
      File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", li
ne 699, in merge_environment_settings
        env_proxies = get_environ_proxies(url, no_proxy=no_proxy)
      File "C:\ProgramData\Anaconda3\lib\site-packages\requests\utils.py", line
766, in get_environ_proxies
        if should_bypass_proxies(url, no_proxy=no_proxy):
      File "C:\ProgramData\Anaconda3\lib\site-packages\conda\gateways\connection
\__init__.py", line 12, in should_bypass_proxies_patched
        return should_bypass_proxies_func(url, no_proxy)
      File "C:\ProgramData\Anaconda3\lib\site-packages\requests\utils.py", line
750, in should_bypass_proxies
        bypass = proxy_bypass(parsed.hostname)
      File "C:\ProgramData\Anaconda3\lib\site-packages\requests\utils.py", line
96, in proxy_bypass
        return proxy_bypass_registry(host)
      File "C:\ProgramData\Anaconda3\lib\site-packages\requests\utils.py", line
83, in proxy_bypass_registry
        if re.match(test, host, re.I):
      File "C:\ProgramData\Anaconda3\lib\re.py", line 191, in match
        return _compile(pattern, flags).match(string)
      File "C:\ProgramData\Anaconda3\lib\re.py", line 304, in _compile
        p = sre_compile.compile(pattern, flags)
      File "C:\ProgramData\Anaconda3\lib\sre_compile.py", line 764, in compile
        p = sre_parse.parse(p, flags)
      File "C:\ProgramData\Anaconda3\lib\sre_parse.py", line 948, in parse
        p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
      File "C:\ProgramData\Anaconda3\lib\sre_parse.py", line 443, in _parse_sub
        itemsappend(_parse(source, state, verbose, nested + 1,
      File "C:\ProgramData\Anaconda3\lib\sre_parse.py", line 836, in _parse
        raise source.error("missing ), unterminated subpattern",
    re.error: missing ), unterminated subpattern at position 0

`$ C:\ProgramData\Anaconda3\Scripts\conda-script.py install -c conda-forge/label
/cf201901 opencv`

  environment variables:
                 CIO_TEST=<not set>
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=C:\ProgramData\Anaconda3\condabin\..\Scripts\conda.exe

               CONDA_EXES="C:\ProgramData\Anaconda3\condabin\..\Scripts\conda.ex
e"
             CONDA_PREFIX=C:\ProgramData\Anaconda3
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=C:\ProgramData\Anaconda3\python.exe
               CONDA_ROOT=C:\ProgramData\Anaconda3
              CONDA_SHLVL=1
           CURL_CA_BUNDLE=<not set>
                 HOMEPATH=\Users\max
                     PATH=C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Libr
ary\mingw-w64\bi
                          n;C:\ProgramData\Anaconda3\Library\usr\bin;C:\ProgramD
ata\Anaconda3\Li
                          brary\bin;C:\ProgramData\Anaconda3\Scripts;C:\ProgramD
ata\Anaconda3\bi
                          n;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Li
brary\mingw-w64\
                          bin;C:\ProgramData\Anaconda3\Library\usr\bin;C:\Progra
mData\Anaconda3\
                          Library\bin;C:\ProgramData\Anaconda3\Scripts;C:\Progra
mData\Anaconda3\
                          bin;C:\ProgramData\Anaconda3\condabin;C:\ProgramData\A
naconda3;C:\Prog
                          ramData\Anaconda3\Library\mingw-w64\bin;C:\ProgramData
\Anaconda3\Libra
                          ry\usr\bin;C:\ProgramData\Anaconda3\Library\bin;C:\Pro
gramData\Anacond
                          a3\Scripts;C:\Scripts;C:\Windows\system32;C:\Windows;C
:\Windows\System
                          32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;E:\
Program Files
                          (x86)\Microchip\xc8\v1.35\bin;C:\Coreutils\bin;C:\Prog
ram Files
                          (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files
\Microsoft SQL
                          Server\130\Tools\Binn;C:\Program Files\Microsoft SQL
                          Server\120\Tools\Binn;C:\Program Files (x86)\IVI
                          Foundation\VISA\WinNT\Bin;C:\Program Files\IVI
                          Foundation\VISA\Win64\Bin;C:\Program Files\NVIDIA Corp
oration\NVIDIA
                          NvDLISR;C:\Python37\Scripts;C:\Python37;C:\Program Fil
es (x86)\GNU
                          Tools ARM Embedded\5.2 2015q4\bin;C:\Coreutils\bin;c:\
Scripts;C:\Users
                          \max\AppData\Local\GitHubDesktop\bin;C:\Users\max\AppD
ata\Local\Progra
                          ms\Microsoft VS Code\bin
             PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>
               VXIPNPPATH=C:\Program Files (x86)\IVI Foundation\VISA\

     active environment : base
    active env location : C:\ProgramData\Anaconda3
            shell level : 1
       user config file : C:\Users\max\.condarc
 populated config files : C:\Users\max\.condarc
          conda version : 4.9.2
    conda-build version : 3.20.5
         python version : 3.8.5.final.0
       virtual packages : __cuda=10.1=0
                          __win=0=0
                          __archspec=1=x86_64
       base environment : C:\ProgramData\Anaconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/label/cf201901/
win-64
                          https://conda.anaconda.org/conda-forge/label/cf201901/
noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\ProgramData\Anaconda3\pkgs
                          C:\Users\max\.conda\pkgs
                          C:\Users\max\AppData\Local\conda\conda\pkgs
       envs directories : C:\ProgramData\Anaconda3\envs
                          C:\Users\max\.conda\envs
                          C:\Users\max\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.5 Windows/7 Wi
ndows/6.1.7601
          administrator : False
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?

[y/N]: ^A

Reply all
Reply to author
Forward
0 new messages