[英]I am getting an InvalidArchiveError in anaconda prompt when I am trying to install spacy. How to solve it?
InvalidArchiveError('Error with archive C:\Users\Sahaja Reddy\Anaconda3\pkgs\openssl-1.1.1g-he774522_0.conda. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCould not unlink (errno=22, retcode=-25, archive_p=1873471744752)') InvalidArchiveError('存档错误 C:\Users\Sahaja Reddy\Anaconda3\pkgs\openssl-1.1.1g-he774522_0.conda。您可能需要删除并重新下载或重新创建此文件。来自 libarchive 的消息是:\ n\n无法取消链接 (errno=22, retcode=-25, archive_p=1873471744752)')
I had this same problem - I had an IPython instance open that was holding onto the Openssl handle open so I wasn't able to delete the Openssl folder as mentioned above by Prayson.我遇到了同样的问题 - 我打开了一个 IPython 实例,该实例打开了 Openssl 句柄,因此我无法删除 Prayson 上面提到的 Openssl 文件夹。 After closing all of my IPython & Python instances through the command prompt, or entering the following in a command prompt:通过命令提示符关闭我的所有 IPython 和 Python 实例后,或在命令提示符中输入以下内容:
TASKKILL /F /IM python.exe
I was then able to run然后我就可以跑了
conda install -c conda-forge libarchive
(as mentioned previously) to update the openssl library without having to actually delete anything. (如前所述)更新 openssl 库,而无需实际删除任何内容。 After that, everything went back to normal.之后,一切又恢复了正常。
The better approach is to do a cleanup更好的方法是进行清理
conda clean --all
https://docs.conda.io/projects/conda/en/latest/commands/clean.html https://docs.conda.io/projects/conda/en/latest/commands/clean.html
InvalidArchiveError when trying to install with conda can happen if you don't have enough free space on the hard disk.如果硬盘上没有足够的可用空间,则尝试使用 conda 安装时可能会发生 InvalidArchiveError。 Make sure you have enough free space.确保您有足够的可用空间。
The issue is with corrupt openssl package.问题在于损坏的 openssl package。 You need to first delete all openssl pkg files and reinstall them.您需要先删除所有 openssl pkg 文件并重新安装它们。 This is what I did:这就是我所做的:
# as the error show where the openssl files are
cd %USERPROFILE%\AppData\Local\Continuum\miniconda3\pkgs\
# with linux I did rm -fr openssl*
DEL /Q /F /S "openssl*"
# install openssl from libarchive
conda install -c conda-forge libarchive
That reinstall openssl and everything will be back to normal.重新安装 openssl 一切都会恢复正常。
I have same problem,and I use root solve this.我有同样的问题,我用root解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.