Can I force pip to reinstall the current version?

前端 未结 7 1939
Happy的楠姐
Happy的楠姐 2020-11-27 09:07

I\'ve come across situations where a current version of a package seems not to be working and requires reinstallation. But pip install -U won\'t touch a package

7条回答
  •  春和景丽
    2020-11-27 09:39

    If you want to reinstall packages specified in a requirements.txt file, without upgrading, so just reinstall the specific versions specified in the requirements.txt file:

    pip install -r requirements.txt --ignore-installed
    

提交回复
热议问题