简体   繁体   中英

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

I wanted to install the matplotlib package using conda.

The actual result was the following:

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

I expected successful installation of matplotlib, so that I could run it on my jupyter notebook.

I used the following command for installing the package:

conda install matplotlib

here is the error that I got:

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

()

Please help me with this, as I'm able to install other packages like pandas, numpy, etc, but its happening only in the case of matplotlib package. Thank you.

Never seen this error before but did you try installing matplotlib via conda while in admin mode?

To do that open your code editor as admin. This usually opens it with additional saving rights if your target download location (most of the time the sidepackages folder of your used environment) is behind a security-rule to prevent unauthorized saving to that location.

Speaking of which this could also be caused by breaking your package dependencies. Did you activate a virtual environment before starting to code? A virtual env is good for saving you a lot of trouble to keep track of dependencies and packages possibly changing theirs causing your code to break when you update.

I have experimented the same issue before while attempting to install a different package. The problem lies with your System variables, which have been set incorrectly. Here is how you solve the issue:

  1. Check if your PATH environment variable is setup properly. Any system should have atleast the below on Path:

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

  1. Add it to Path if it is not there. This should fix the issue

Source & more details here: 'chcp' is not recognized as an internal or external command, operable program or batch file. on a Windows PC

I solved this by

conda clean --all

after that, reinstall the package

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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