Can I force pip to reinstall the current version?

前端 未结 7 1886
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:47

    You might want to have all three options: --upgrade and --force-reinstall ensures reinstallation, while --no-deps avoids reinstalling dependencies.

    $ sudo pip install --upgrade --no-deps --force-reinstall <packagename>
    

    Otherwise you might run into the problem that pip starts to recompile Numpy or other large packages.

    0 讨论(0)
提交回复
热议问题