WARNING: Ignoring invalid distribution -yproj (c:\users\space_junk\appdata\local\programs\python\python310\lib\site-packages) WARNING: Ignoring invalid distribution -yproj (c:\users\space_junk\appdata\local\programs\python\python310\lib\site-packages) WARNING: Ignoring invalid distribution -yproj (c:\users\space_junk\appdata\local\programs\python\python310\lib\site-packages)
2 Answers
I was getting a similar message that turned out be caused by a previous failed pip upgrade. I had attempted to upgrade pip from a user account that didn't have the proper rights. There was a temp directory left behind in site-packages that began with ~ip which was causing pip to complain every time it ran. I removed the directory and was able to re-upgrade pip using an account that had proper permissions. No more warnings from pip.
Did you have a problem installing something like pyproj by any chance? The temp directory seems to be named by replacing the first letter of the library with a ~.

- 311
- 3
- 6
-
yeah I had such problem but on trying your answer, everything is now okay, thanks!! – nios Jul 05 '22 at 19:01
-
2I'm far from an expert on package installation, but here's what I've learned from debugging this issue and many others connected to it: Check if there are packages (usually in your site-packages ) that begin with ~, meaning they were temporary files that never got cleaned up after an error in installation. If you find any, delete them!! – Larry Panozzo Oct 26 '22 at 17:47
I had the same problem with matplotlib. It looked like I wanted to install a package from some sort of unauthorized source.
You should delete the folder that caused the problem in site-packages folder. In your case, it is ~yproj (In my case, it was ~atplotlib).
In short :
- Find the site-packages folder -> Type "pip show pyproj" or any other library you want!
- Delete the folder mentioned in the warning :
~yproj
in your case

- 827
- 1
- 8
- 18

- 31
- 4