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

We Are Going To Discuss About Why do I get this when using pip WARNING: Ignoring invalid distribution -ip?. So lets Start this Python Article.

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

  1. How to solve Why do I get this when using pip WARNING: Ignoring invalid distribution -ip?

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

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

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

Solution 1

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 ‘~’.

Original Author talha khalid Of This Content

Solution 2

go to ‘site-packages’ directory, delete folders whose name start with ~ (tilde)

Original Author Mustafa Kemal Of This Content

Solution 3

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.

Original Author S Habeeb Ullah Of This Content

Solution 4

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)

Original Author Amar_AI Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment