Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)')

like image 646
Sahaja Reddy Avatar asked May 11 '20 09:05

Sahaja Reddy


2 Answers

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. After closing all of my IPython & Python instances through the command prompt, or entering the following in a command prompt:

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. After that, everything went back to normal.

like image 83
OliverH Avatar answered Sep 19 '22 13:09

OliverH


The better approach is to do a cleanup

conda clean --all

https://docs.conda.io/projects/conda/en/latest/commands/clean.html

like image 21
Ahmad AlMughrabi Avatar answered Sep 17 '22 13:09

Ahmad AlMughrabi