简体   繁体   English

当我尝试安装 spacy 时,我在 anaconda 提示中收到 InvalidArchiveError。 如何解决?

[英]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.

相关问题 尝试在 Anaconda Prompt 中创建 tensorflow 环境时,为什么会出现“[Errno 13] Permission denied”? - Why am I getting "[Errno 13] Permission denied" when trying to create a tensorflow environment in Anaconda Prompt? 为什么在尝试安装FiPy时出现错误? - Why am I getting errors when trying to install FiPy? 当我尝试在Windows上安装LocalStack时遇到此错误 - Getting this error when I am trying to install LocalStack on windows 我正在尝试安装 PyQt6 并收到元数据错误 - I am trying to install PyQt6 and am getting metadata error 尝试替换时出现类型错误 - I am getting a type error when I am trying to replace 当我尝试执行 django 模型迁移命令时出现错误 - python manage.py 迁移。 如何解决这个错误? - I am getting an error in when i am trying to execute django models migrate command - python manage.py migrate . How to solve this error? 我一直在尝试将一组值 qcut 到 4 个 bin 中。 我收到以下错误? 如何解决这个问题我是 Python 的初学者 - I have been trying to qcut an array of values into 4 bins. I am getting the error below? How to solve this I am a beginner in Python 我正在尝试使用“pip install Pillow”安装枕头,但出现错误 - I am trying to install pillow using 'pip install Pillow' but I am getting error 尝试安装命令“ python setup.py egg_info”失败时出现错误代码1 - I am getting this error when I am trying to install Command “python setup.py egg_info” failed with error code 1 为什么我在尝试检查碰撞时会出现类型错误,我该如何解决? - Why am i getting Type errors when i am trying to check for collision and how can i fix it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM