How to restore old egg file when update fails?

I installed the package xxx-1.0using pipand installed the egg file /usr/local/lib/python2.7/dist-packages/xxx-1.0-py2.7.egg. After updating the package, the file xxx-1.0-py2.7.eggwas replaced with xxx-2.0-py2.7.egg. But the update failed. When I tried the update again, pipI saw the file xxx-1.0-py2.7.eggand complained that it was already installed. Having deleted the egg file manually, I can update, but I do not want to do this.

Is there a way to let pipme restore the original egg file if the update fails?

+4
source share
2 answers

If you want to reinstall a specific version, you can specify it with pip install xxx==1.0.

0

.egg, . ,

  • 2.0
    • , , " "
  • pip install .egg
    • , " " ,
0

Source: https://habr.com/ru/post/1660488/


All Articles