簡體   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