Latest 'pip' fails with “requires setuptools >= 0.8 for dist-info”

后端 未结 2 1778
孤街浪徒
孤街浪徒 2020-12-02 06:45

Using the recent (1.5) version of pip, I get an error when attempting to update several packages. For example, sudo pip install -U pytz results in

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 07:37

    First, you should never run 'sudo pip'.

    If possible you should use your system package manager because it uses GPG signatures to ensure you're not running malicious code.

    Otherwise, try upgrading setuptools:

    easy_install -U setuptools
    

    Alternatively, try:

    pip install --user 
    

    This is of course for "global" packages. You should ideally be using virtualenvs.

提交回复
热议问题