Fix Python pip WARNING: Ignoring invalid distribution -pencv-python – Python Tutorial

By | August 10, 2022

When we are using pip to install some python packages, we may find this warning: WARNING: Ignoring invalid distribution. In this tutorial, we will introduce you how to fix it.

This warning looks like:

Fix Python pip WARNING Ignoring invalid distribution -pencv-python - Python Tutorial

How to fix this warning?

It is easy to fix this problem, we can open the directory site-packages and find folders reported in warning message, then delete them.

Especially, these invalid distribution packages start with symbol “~”.

remove invalid python packages

For example, as to us, we will delete ~pencv_python- Then, this warning will disappear.