InvalidArchiveError

I’m trying to get a more practical grip on data science with Python and thought it would be a good idea to follow a tutorial (hoping to avoid doing lots of troubleshooting). However, I didn’t get very far until the mess started.

I follow this tutorial Python and Data Science Tutorial in Visual Studio Code

As the tutorial suggests, I have installed miniconda, but when trying to create the environment and installing the required packages (step 1 - run the following in an Anacodna command prompt: conda create -n myenv python=3.10 pandas jupyter seaborn scikit-learn keras tensorflow ), I immidiately run in to trouble and get this error:

InvalidArchiveError("Error with archive C:\Users\username\AppData\Local\miniconda3\pkgs\tensorflow-base-2)

Tried searching for this error, asked copilot for help, but nothing suggested seems to work and I cannot continue the tutorial without it…

Any ideas?

I tried updating Conda using

conda update conda

Tried cleaning up

conda clean --all

Verified that I have full control of the directory.

Ensured I have plenty of free space on the drive.

And finally (after suggestion from another forum) removed every item with openssl in the name then installed from libarchive then tried creating the environment again.

But still the same error

I’m new to VSCode, Python and Conda so I have no idea what else to try

Hello,

Can you please check whether the directory:
C:\Users\username\AppData\Local\miniconda3\pkgs\tensorflow-base-2

got removed from your system. If it didn’t after cleaning your machine delete the ‘tensorflow-base-2’ folder and try creating the python environment again.

Hi and thanks for helping out!

After running the clean all command there is no directory left named anything tensor*

After running the create command again I get a few named something with tensor* but not any one named specifically “tensorflow-base-2”

I still get the same error

image

I continued trying to create the environment without Tensorflow (thought that if I can install that later with pip).

This time I came a little bit further but then other errors came.

Preparing transaction: done
Verifying transaction: failed

CondaVerificationError: The package for pip located at C:\Users\username\AppData\Local\miniconda3\pkgs\pip-23.3.0
appears to be corrupted. The path ‘Lib/site-packages/pip/_vendor/truststore/pycache/_openssl.cpython-310.pyc’
specified in the package manifest cannot be found.

CondaVerificationError: The package for pip located at C:\Users\username\AppData\Local\miniconda3\pkgs\pip-23.3.0
appears to be corrupted. The path ‘Lib/site-packages/pip/_vendor/truststore/_openssl.py’
specified in the package manifest cannot be found.

ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults/win-64::notebook-7.0.8-py310haa95532_0, defaults/win-64::notebook-7.0.8-py310haa95532_0
path: ‘menu/notebook.json’

Did some more troubleshooting: Ensured all Paths are correct in System Variables

Ran Conda clean – all again, restarted Anaconda Terminal, ran it as admin and still got the same issue, although with slightly more detail in the error message (seems the terminal window refuses to break lines so using a 4k screen and full screen mode helped)

Now it says: InvalidArchiveError("Error with archive C:\Users\username\AppData\Local\miniconda3\pkgs\tensorflow-base-2.10.0-mkl_py310h6a7f48e_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\\username\\AppData\\Local)

Doesn’t say me much though as this obviously is something conda should setup during the installation process