Reputation: 346
I have conda 4.8.1 running on windows 10 enterprise edition and it is showing me following error whenever I try to install notebook.
InvalidArchiveError("Error with archive D:\\Miniconda3\\pkgs\\notebook-6.0.2-py37_0ujelie94\\pkg-notebook-6.0.2-py37_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCan't create '\\\\?\\D:\\Miniconda3\\pkgs\\notebook-6.0.2-py37_0\\Lib\\site-packages\\notebook\\static\\components\\MathJax\\extensions\\a11y\\invalid_keypress.mp3'")
I have tried different versions of notebook and reinstalled anaconda and miniconda many times. Nothing seems to work.
Upvotes: 14
Views: 25842
Reputation: 31
On Windows you may need to enable "long paths" if the package being installed has many sub-directories.
In my case, conda install tensorflow=2.10.0
would produce this error.
InvalidArchiveError("Error with archive C:\\Users\\user\\AppData\\Local\\miniconda3\\pkgs\\tensorflow-base-2.10.0-mkl_py39h6a7f48e_0.conda. You probably need to delete and re-download or re-create this file. Message was:\n\nfailed with error: [Errno 2] No such file or directory: 'C:\\\\Users\\\\user\\\\AppData\\\\Local\\\\miniconda3\\\\pkgs\\\\tensorflow-base-2.10.0-mkl_py39h6a7f48e_0\\\\Lib\\\\site-packages\\\\tensorflow\\\\include\\\\tensorflow\\\\compiler\\\\mlir\\\\hlo\\\\_virtual_includes\\\\compose_set_interface_inc_gen\\\\mlir-hlo\\\\Dialect\\\\gml_st\\\\transforms\\\\compose_set_interface.h.inc'")
The path length of the missing directory was 329 characters. The default Windows 10 path length is 260 characters.
I toggled long paths and Tensorflow installed successfully.
Upvotes: 3
Reputation: 1
For me, using pip worked. It downloaded the correct version of TensorFlow (2.16.3), which is compatible with Python 3.9.18. I had TensorFlow 2.10.0, which was giving the InvalidArchiveError.
pip install tensorflow
Upvotes: 0
Reputation: 371
I had the same problem on Ubuntu 18.04, I used conda clean -a
and then it works perfectly.
Actually what conda clean -a
does is cleaning the compressed .bz files and deleting older versions of package folders and does nothing to the new ones.
P.S.: Make sure you installed Anaconda or Miniconda into a directory that contains only 7-bit ASCII characters and no spaces, such as C:\anaconda!
Upvotes: 23