No module named pkg_resources

后端 未结 30 3054
一向
一向 2020-11-22 07:22

I\'m deploying a Django app to a dev server and am hitting this error when I run pip install -r requirements.txt:

Traceback (most recent call la         


        
30条回答
  •  感动是毒
    2020-11-22 07:50

    A lot of answers are recommending the following but if you read through the source of that script, you'll realise it's deprecated.

    wget https://bootstrap.pypa.io/ez_setup.py -O - | python
    

    If your pip is also broken, this won't work either.

    pip install setuptools
    

    I found I had to run the command from Ensure pip, setuptools, and wheel are up to date, to get pip working again.

    python -m pip install --upgrade pip setuptools wheel
    

提交回复
热议问题