【发布时间】:2018-06-18 20:31:09
【问题描述】:
我正在尝试在 Windows 机器上使用 conda 安装 opencv。我正在运行以下命令:
conda install --channel https://conda.anaconda.org/menpo opencv
并得到以下错误:
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')
其他人似乎也有类似的问题 (https://github.com/conda/conda/issues/4393)。我发现的解决方案之一是降级 conda。我目前正在使用conda 4.5.4,当我尝试使用conda install conda=4.2 降级时,出现以下错误:
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')
关于这个问题,我发现了以下类似的帖子:
conda update conda permission error
Anaconda : Update conda failed because permission error
但是给出的解决方案并不能解决我的问题。
【问题讨论】:
-
可能是您的问题与此有关(由于清空 CONDA_TRASH 导致的问题)stackoverflow.com/questions/41653630/… 我遇到了类似的错误,我最终通过创建一个新环境并安装了我想要的包(
py-xgboost)。 -
嗨,我也必须创建一个新环境,并且它有效
-
很高兴能帮上忙! @robt