Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

Why do I get this when using pip WARNING: Ignoring invalid distribution -ip?

Writer Andrew Henderson

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?

5

5 Answers

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 '~'.

5

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 directly another version(upgrade/downgrade) using pip without uninstalling the previous version

Check below image

enter image description here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy