2

I am trying to install opencv using conda on a windows machine. I am running the following command:

conda install --channel https://conda.anaconda.org/menpo opencv

and getting the following error:

Solving environment: done

## Package Plan ##
environment location: C:\ProgramData\Anaconda2

added / updated specs:
- opencv

The following NEW packages will be INSTALLED:
opencv: 2.4.11-py27_1 menpo

Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: - WARNING conda.gateways.disk:exp_backoff_fn(49): 
Uncaught backoff with errno EEXIST 17
failed

ERROR conda.core.link:_execute(502): An error occurred while installing 
package 'None'.

IOError(13, 'Permission denied')

Attempting to roll back.

Rolling back transaction: done
IOError(13, 'Permission denied')
WindowsError(183, 'Cannot create a file when that file already exists')

Other people seem to have similar problems (https://github.com/conda/conda/issues/4393). One of the solutions I found was to downgrade conda. I am currently using conda 4.5.4 and when I try to downgrade using conda install conda=4.2 I get the following error:

The following packages will be DOWNGRADED:
    conda:       4.5.4-py27_0  --> 4.2.16-py27_0
    conda-build: 3.10.5-py27_0 --> 3.9.2-py27_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: failed

ERROR conda.core.link:_execute(502): An error occurred while uninstalling 
package 'defaults::conda-build-3.10.5-py27_0'.
WindowsError(5, 'Access is denied')

Attempting to roll back.
Rolling back transaction: done

WindowsError(5, 'Access is denied')

Regarding this issue I found the following similar posts:

conda update conda permission error

Anaconda : Update conda failed because permission error

But the solutions given do not fix my problem.

robt
  • 67
  • 7
  • 1
    It could be that your issue is related to this one (problems due with emptying CONDA_TRASH) https://stackoverflow.com/questions/41653630/warning-conda-gateways-diskexp-backoff-fn47-uncaught-backoff-with-errno-41 I had a similar error to you and I ended up solving it by creating a new environment and installing the package I wanted (`py-xgboost`) there instead. – meenaparam Jun 28 '18 at 15:50
  • 1
    Hi, I had to create a new environment too, and it worked – robt Jul 17 '18 at 20:20
  • 1
    Glad to have helped! @robt – meenaparam Jul 18 '18 at 10:56

2 Answers2

1

I also had a problem with installation and usage of the OpenCV library. If you have such а problem, you can try:

  1. uninstall opencv with: conda remove --yes opencv (in case you have an installation but it does not work properly)
  2. install OpenCV through pip: pip install opencv-python

I think this is a problem with opencv that comes from Anaconda channels. I came across this problem four months ago. Тhe problem may be resolved right now.

dim
  • 992
  • 11
  • 26
0

My guess is that you did not run this command with administrator privileges!