question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignoring invalid distribution -ip

See original GitHub issue

Description

After installing pip via get-pip.py I obtain mystic packages starting from ~ in site packages directory.

Expected behavior

Installing pip on clear python without pip must not flood warnings and create error packages.

pip version

Python version

3.9

OS

Windows 10

How to Reproduce

Reproducing

user@host MINGW64 ~                                                                                 
$ pip list | grep pip                                                                                           
Traceback (most recent call last):                                                                              
  File "C:\Python39\lib\runpy.py", line 197, in _run_module_as_main                                             
    return _run_code(code, main_globals, None,                                                                  
  File "C:\Python39\lib\runpy.py", line 87, in _run_code                                                        
    exec(code, run_globals)                                                                                     
  File "C:\Python39\Scripts\pip.exe\__main__.py", line 4, in <module>                                           
ModuleNotFoundError: No module named 'pip'   

user@host MINGW64 ~                                                                                  
$ curl https://bootstrap.pypa.io/get-pip.py > get-pip.py                                             
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                 
                                 Dload  Upload   Total   Spent    Left  Speed                                   
100 1911k  100 1911k    0     0  2359k      0 --:--:-- --:--:-- --:--:-- 2362k                                  
                                                                                                                
user@host MINGW64 ~                                             
$ sudo py ./get-pip.py                                                     
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) 
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) 
Collecting pip                                                             
  Using cached pip-21.2.4-py3-none-any.whl (1.6 MB)                        
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) 
Installing collected packages: pip                                         
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) 
Successfully installed pip-21.2.4                                          
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) 
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) 
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) 
                                                                           
user@host MINGW64 ~                                             
$ pip list | grep pip                                                      
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) 
pip                       21.2.4                                           
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) 
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)        

user@host MINGW64 ~
$ ls c:\\python39\\lib\\site-packages | grep ~ip
~ip/
~ip-21.2.3.dist-info/                                                         

Temporary solution

user@host MINGW64 ~
$ rm -rf /c//python39//lib//site-packages/~ip*

user@host MINGW64 ~
$ pip list | grep pip
pip                       21.2.4

user@host MINGW64 ~
$ ls c:\\python39\\lib\\site-packages | grep ~ip

p.s. sudo is as temporary solution to #9527

Output

No response

Code of Conduct

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Sep 10, 2021

There are a myriad of things can happen on Windows that make file deletion fail. We should add a message in the warning message to tell the user to delete those files manually.

0reactions
baterflyritycommented, Mar 11, 2022

@uranusjr , actually one can just create necessary folders. But i cant consider this as “reproducable approach”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site ...
I have anaconda and Python installed. I use Jupyter Notebook and Python in VS Code. This is in Git Bash command line. My...
Read more >
Solving Python Ignoring Invalid Distribution
It occurs due to multiple versions installation of libraries. At times conda or pip failed to uninstall the versions. Instead, it renames it...
Read more >
Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
To resolve the issue, open the lib\site-packages directory from the warning message and delete all folders with names starting with a tilde ~ ......
Read more >
Why do I get this when using pip - Ignoring invalid distribution
The point is that, you are getting this warning because pip notices that you have something installed on your machine with an invalid...
Read more >
Fix - Python - Warning- Ignoring Invalid Distribution
WARNING: ignoring invalid distribution -ip. The problem is in the folder where the packages are stored, in my case C:\python310\lib\site- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found