Fix - Python - Warning- Ignoring Invalid Distribution
[Python, Fixes]
When doing pip update or pip list you might get the following warning:
WARNING: ignoring invalid distribution -ip

The problem is in the folder where the packages are stored, in my case C:\python310\lib\site-packages
If I list the contents of that folder I get this printout:

Those are the problematic packages - those folders prefixed by ~.
You can list them using this PowerShell command:
ls ~*
The fix for this is simple. Delete them.
The following PowerShell command recursively deletes all folders starting with ~
rm -r ~*
You can then verify that the warning is gone:

Happy hacking!