How do I fix 'ImportError: cannot import name IncompleteRead'?

前端 未结 16 1364
暖寄归人
暖寄归人 2020-11-28 18:22

When I try to install anything with pip or pip3, I get:

$ sudo pip3 install python3-tk
Tra         


        
16条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 19:22

    This problem is caused by a mismatch between your pip installation and your requests installation.

    As of requests version 2.4.0 requests.compat.IncompleteRead has been removed. Older versions of pip, e.g. from July 2014, still relied on IncompleteRead. In the current version of pip, the import of IncompleteRead has been removed.

    So the one to blame is either:

    • requests, for removing public API too quickly
    • Ubuntu for updating pip too slowly

    You can solve this issue, by either updating pip via Ubuntu (if there is a newer version) or by installing pip aside from Ubuntu.

提交回复
热议问题