繁体   English   中英

错误 conda.core.link:_execute(699): 安装包“defaults::qt-5.9.7-vc14h73c81de_0”时出错。 回滚事务:完成

[英]ERROR conda.core.link:_execute(699): An error occurred while installing package 'defaults::qt-5.9.7-vc14h73c81de_0'. Rolling back transaction: done

我想使用 conda 安装 matplotlib 包。

实际结果如下:

ERROR conda.core.link:_execute(699): An error occurred while installing package 'defaults::qt-5.9.7-vc14h73c81de_0'.

我希望能成功安装 matplotlib,这样我就可以在我的 jupyter 笔记本上运行它。

我使用以下命令安装软件包:

conda install matplotlib

这是我得到的错误:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(699): An error occurred while installing package 'defaults::qt-5.9.7-vc14h73c81de_0'.
Rolling back transaction: done

LinkError: post-link script failed for package defaults::qt-5.9.7-vc14h73c81de_0
location of failed script: C:\Users\Asus\Desktop\env\Scripts\.qt-post-link.bat
==> script messages <==
<None>
==> script output <==
stdout:         1 file(s) copied.

stderr: 'chcp' is not recognized as an internal or external command,
operable program or batch file.
'chcp' is not recognized as an internal or external command,
operable program or batch file.
'chcp' is not recognized as an internal or external command,
operable program or batch file.

return code: 1

()

请帮我解决这个问题,因为我可以安装其他包,如 pandas、numpy 等,但它只发生在 matplotlib 包的情况下。 谢谢你。

以前从未见过此错误,但您是否尝试在管理员模式下通过 conda 安装 matplotlib?

为此,请以管理员身份打开您的代码编辑器。 如果您的目标下载位置(大多数情况下,您使用的环境的 sidepackages 文件夹)位于安全规则之后,则这通常会以额外的保存权限打开它,以防止未经授权的保存到该位置。

说到这也可能是由于破坏了您的包依赖项引起的。 您在开始编码之前是否激活了虚拟环境? 虚拟环境可以为您省去很多麻烦来跟踪依赖项和包,这些依赖项和包可能会更改它们,从而在您更新时导致代码中断。

我之前在尝试安装不同的软件包时曾尝试过同样的问题。 问题在于您的系统变量设置不正确。 以下是您解决问题的方法:

  1. 检查您的 PATH 环境变量是否设置正确。 任何系统都应至少在路径上具有以下内容:

%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;

  1. 如果它不存在,则将其添加到 Path 中。 这应该可以解决问题

来源和更多细节在这里: 'chcp' 不是内部或外部命令,也不是可运行的程序或批处理文件。 在 Windows PC 上

我解决了这个问题

conda clean --all

之后,重新安装包

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM