如何使用 pip 卸载 git repo?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8926566/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to uninstall a git repo using pip?
提问by Phil Gyford
I'm using pip in a virtualenv and have installed a package from a git repo by doing this:
我在 virtualenv 中使用 pip 并通过执行以下操作从 git repo 安装了一个包:
pip install -e git://github.com/dwaiter/django-bcrypt.git@475a3bef1e3ff31935a2dc905e244a63a804fce9#egg=django_bcrypt-dev
But I now want to uninstall that and can't see how, as it doesn't have a conventional package name. I've tried what seem like obvious variations (like replacing 'install' with 'uninstall') but can't see how to do this from the docs.
但是我现在想卸载它并且看不到如何卸载,因为它没有传统的包名称。我已经尝试过看起来很明显的变化(比如用“卸载”替换“安装”),但从文档中看不到如何做到这一点。
(In this case I ultimately want to upgrade from the git repo version of django-bcrypt to version 0.9.2, and am assuming I need to uninstall the git version first.)
(在这种情况下,我最终想从 django-bcrypt 的 git repo 版本升级到 0.9.2 版本,并且假设我需要先卸载 git 版本。)
回答by zsquare
You uninstall it like you would any other library:
您可以像卸载任何其他库一样卸载它:
pip uninstall django-bcrypt
pip uninstall django-bcrypt
If you want to ultimately upgrade, you could also do
如果你想最终升级,你也可以这样做
pip install --upgrade -e git://github.com/dwaiter/django-bcrypt.git#egg=django_bcrypt
pip install --upgrade -e git://github.com/dwaiter/django-bcrypt.git#egg=django_bcrypt