For the past few weeks everytime I have downloaded a package using pip i get this: WARNING: Ignoring invalid distribution -ip (path to packages) . Any ideas why I get this?
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) Since Python is messy in the way it handles packages you sometimes need this fix. This can happen when a package fails to install (reason may be permissions based).
How to fix Python when you get messages like: WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) Since Python is messy in the way it handles packages you sometimes need this fix. This can happen when a package fails to install (reason may be permissions based).
The point is that, you are getting this warning because pip notices that you have something installed on your machine with an invalid name, ‘-ip’. If I were to guess I would say that you attempted to upgrade pip itself at some point and misspellt ‘pip’. That’s probably the reason.
Please include the version of Python and Pip you are using and list an example of the error, i.e. exactly what command you entered and the exact response. Gives an actual example of the error. Does this answer your question? Pip "Ignoring invalid distribution" warning
This occurs due to files names with the '~' prefix in site-packages. Please remove those files / folders. It will solve your problem.
You can list them with
ls -a /xx/xx/xx/lib/pythonx.x/site-packages | grep "^~"
Then remove files/folders prefixed by '~'.
go to 'site-packages' directory, delete folders whose name start with ~ (tilde)
This happens due to multiple versions installation of libraries, at times conda or pip failed to uninstall the versions instead rename it to "~ip" so, suggest we find site-packages in our python installation and search for "~ip" and delete such folders which begin with ~ip. Then the problem will get resolved and we will not get any such warnings. Otherwise, it is only a warning because of such folders existing in the installation that we can ignore.
I faced the same issue. It got fixed by going to site-packages and deleting the folders starting with ~.
>pip install pyspark
WARNING: Ignoring invalid distribution -yspark (c:\users\anaconda3\lib\site-packages)
WARNING: Ignoring invalid distribution -yspark (c:\users\anaconda3\lib\site-packages)
Requirement already satisfied: pyspark in c:\users\appdata\roaming\python\python39\site-packages (3.2.1)
Requirement already satisfied: py4j==0.10.9.3 in c:\users\anaconda3\lib\site-packages (from pyspark) (0.10.9.3)
WARNING: Ignoring invalid distribution -yspark (c:\users\anaconda3\lib\site-packages)
WARNING: Ignoring invalid distribution -yspark (c:\users\anaconda3\lib\site-packages)
WARNING: Ignoring invalid distribution -yspark (c:\users\anaconda3\lib\site-packages)
WARNING: Ignoring invalid distribution -yspark (c:\users\anaconda3\lib\site-packages)
Deleted the duplicate folder ~spark 0.2.1
.
>pip install pyspark
Requirement already satisfied: pyspark in c:\users\appdata\roaming\python\python39\site-packages (3.2.1)
Requirement already satisfied: py4j==0.10.9.3 in c:\users\anaconda3\lib\site-packages (from pyspark) (0.10.9.3)
Go to site-packages folder and delete the folders with ~ symbol. I observed this happens when we install another version(upgrade/downgrade) using pip before uninstalling the previous version
Check below image
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With