我正在尝试更新包,当它经历这个过程时,它最终停止并回滚,而不进行更新。我正在尝试运行这个(我也尝试过其他包,如astroML、basemap、nltk等,也有类似的效果):
conda install conda --update-all这就是我得到的错误:
Preparing transaction: done
Verifying transaction: done
Executing transaction: | b'Enabling notebook extension jupyter-js-widgets/extens
ion...\n - Validating: ok\n'
done
ERROR conda.core.link:_execute(696): An error occurred while installing package
'conda-forge::qt-5.9.7-h506e8af_3'.
Rolling back transaction: done
LinkError: post-link script failed for package conda-forge::qt-5.9.7-h506e8af_3
location of failed script: C:\Users\Mike\Anaconda3\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
()我已经尝试过conda.core.link:_execute(637)和chcp error的答案,但没有成功。如果我尝试通过Anaconda Navigator更新,看起来我得到了相同的结果。感谢大家在理解和解决这个问题上的帮助,谢谢!
发布于 2019-08-21 16:20:31
这可能不是最实用的解决方案,但是因为您已经尝试了前面问题的答案,所以您可能只需要重新安装conda。这需要一段时间,但对我来说,这是唯一有效的修复方法。
不幸的是,这意味着您将删除所有环境,因此现在可能是为它们创建一个environment.yml文件的最佳时机(如果您已经有了这些文件,也可以拍拍自己的后背)。
发布于 2020-11-25 10:06:25
我曾经遇到过同样的问题,经过3个小时的谷歌搜索,我找到了解决方案,每个错误都以.qt-post-link.bat语句结束,它是由windows管理员访问造成的,所以以管理员身份打开您的CMD,然后执行命令。
下面是我的结果
C:\Users\muham\Documents\xxx\python\sample_project>conda install numpy matplotlib scikit-learn pandas
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:\Users\xxx\miniconda3
added / updated specs:
- matplotlib
- numpy
- pandas
- scikit-learn
lz4-c pkgs/main/win-64::lz4-c-1.9.2-hf4a77e7_3
matplotlib pkgs/main/win-64::matplotlib-3.3.2-0
matplotlib-base pkgs/main/win-64::matplotlib-base-3.3.2-py38hba9282a_0
mkl pkgs/main/win-64::mkl-2020.2-256
mkl-service pkgs/main/win-64::mkl-service-2.3.0-py38h2bbff1b_0
mkl_fft pkgs/main/win-64::mkl_fft-1.2.0-py38h45dec08_0
mkl_random pkgs/main/win-64::mkl_random-1.1.1-py38h47e9c7a_0
numpy pkgs/main/win-64::numpy-1.19.2-py38hadc3359_0
numpy-base pkgs/main/win-64::numpy-base-1.19.2-py38ha3acd2a_0
olefile pkgs/main/noarch::olefile-0.46-py_0
pandas pkgs/main/win-64::pandas-1.1.3-py38ha925a31_0
pillow pkgs/main/win-64::pillow-8.0.1-py38h4fa10fc_0
pytz pkgs/main/noarch::pytz-2020.1-py_0
scikit-learn pkgs/main/win-64::scikit-learn-0.23.2-py38h47e9c7a_0
scipy pkgs/main/win-64::scipy-1.5.2-py38h14eb087_0
threadpoolctl pkgs/main/noarch::threadpoolctl-2.1.0-pyh5ca1d4c_0
tk pkgs/main/win-64::tk-8.6.10-he774522_0
xz pkgs/main/win-64::xz-5.2.5-h62dcd97_0
zstd pkgs/main/win-64::zstd-1.4.5-h04227a9_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
C:\Users\muham\Documents\cxxx\python\sample_project>https://stackoverflow.com/questions/57563352
复制相似问题