Why such an error occurs when using pip install to install the package?

Question:

WARNING: Ignoring invalid distribution -ip (d:python_3.9.7libsite-packages) is displayed during the installation process

why does this appear?

Asked By: Mark

||

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 (linux, mac) with

ls -a /xx/xx/xx/lib/pythonx.x/site-packages | grep "^~"

on windows I would strongly recommend the linux subsystem for windows for this kind of actions. But of course this can also be done via the explorer or the cmd

Then remove files/folders prefixed by ‘~’.

Answered By: raphiel
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.