3

I have the following WARNING on my terminal:

WARNING: Ignoring invalid distribution - (/opt/anaconda3/lib/python3.8/site-packages)

Having read some other reviews, I know that if I delete the folder it will get rid of the warning. But I can't seem to find the folder. I am using a Mac and I've tried to look for it manually.

Any ideas how to locate the folder or just delete it via my terminal?

2 Answers2

1

The location of the folder is given in the error: /opt/anaconda3/lib/python3.8/site-packages.

I would assume you did not see the directory because macOS hides root directories (and dotfiles) by default in Finder. Here is a guide to show hidden files on macOS.

However, we can go to the directory and delete the directory in the Terminal.

First, you can go to the directory with

cd /opt/anaconda3/lib/python3.8/site-packages

Let us breakdown what this command does:

classification part of command explanation
built-in program cd The Change Directory command. It takes one argument, a file(you could call it a directory, but technically everything in Unix is a file) you want to go to.
command line argument /opt/anaconda3/lib/python3.8/site-packages This is the directory you are supplying to cd

Second, you can remove the directory with

rm --recursive --force /opt/anaconda3/lib/python3.8/site-packages

Let us also break down what this command does:

classification part of command explanation
program rm The remove command removes files from your file system. It takes in the file(s) you want removed.
flag --recursive This flag tells rm to remove the contents of a directory provided.
flag --force This flag makes sure that rm does not prompt while we are removing the directory
command line argument /opt/anaconda3/lib/python3.8/site-packages This is the directory rm is going to delete

I highly suggest you read the Manual pages for these two this program. See man rm(cd does not have a Man page).

The shell is a very powerful tool once you master it. Here is a tutorial that might be of use to you.

unrealapex
  • 578
  • 9
  • 23
-4

If you can download Visual Studio Code, try to install the packages from the terminal there. Once the error pops up on the terminal in Visual Studio Code, press Ctrl + Click on the path and it should take you to the actual folder. What you then want to do is delete the folders that start with ~. You can then delete Visual Studio Code after if you want. Hope this helps.

unrealapex
  • 578
  • 9
  • 23
  • While this is one method to find the folder, nothing needs to be installed to perform this task. – unrealapex Apr 01 '23 at 21:00
  • 2
    This is quite possibly the worst possible solution. OP just needs help finding the directory. There's no reason, nor is it remotely reasonable, to download a gigantic IDE to just get help browsing your file system. Most OSes already have built-ins GUIs to do that for you. – Michael M. Apr 02 '23 at 23:59