I keep getting this error and I cant seem to fix I have tried everything that chatgpt has offered as help but to no avail. here is what i have done so far:
Steps to Fix InvalidArchiveError
-
Remove the Corrupted Package:
- First, you need to remove the corrupted package file. You can do this by navigating to the
pkgs
directory mentioned in the error message:
- First, you need to remove the corrupted package file. You can do this by navigating to the
Code
C:\Users\dooms\anaconda3\pkgs\
-
Locate the folder named
pytorch-2.8.0-cuda128_mkl_py311_hd9a8a8a_300
and delete it. -
Clear Conda Cache:
- It’s good practice to clear the Conda cache to avoid issues with other packages. Run this command in your terminal:
Code
conda clean --all
-
Reinstall PyTorch:
- After clearing the cache, try reinstalling PyTorch. You can do this with:
Code
conda install pytorch torchvision torchaudio cudatoolkit=11.8 -c pytorch
- Make sure to adjust the
cudatoolkit
version according to your system requirements and compatibility.
to be fair I think some of it was my fault I had not installed the cudatoolkit so I did then I restarted my system and still got the error .
InvalidArchiveError("Error with archive C:\Users\dooms\anaconda3\pkgs\pytorch-2.8.0-cuda128_mkl_py311_hd9a8a8a_300)