如何使用pip卸载git repo?

Phi*_*ord 33 git pip

我在virtualenv中使用pip,并通过这样做从git repo安装了一个包:

pip install -e git://github.com/dwaiter/django-bcrypt.git@475a3bef1e3ff31935a2dc905e244a63a804fce9#egg=django_bcrypt-dev
Run Code Online (Sandbox Code Playgroud)

但是我现在想要卸载它并且看不清楚,因为它没有传统的包名.我尝试了一些看起来很明显的变化(比如将'install'替换为'uninstall'),但是无法从文档中看到如何做到这一点.

(在这种情况下,我最终想从django-bcrypt的git repo版本升级到版本0.9.2,并假设我需要先卸载git版本.)

zsq*_*are 39

您可以像卸载任何其他库一样卸载它:

pip uninstall django-bcrypt

如果你想最终升级,你也可以这样做

pip install --upgrade -e git://github.com/dwaiter/django-bcrypt.git#egg=django_bcrypt

  • 它对我不起作用.`PIP freeze`给"-e混帐://github.com/mikemaccana/python-docx.git@53a0e3dd0e91ff9c911e8d8824a7c89df6c587c8#egg=docx-dev"但'点子卸载蟒蛇,docx`导致错误"无法卸载要求蟒蛇,DOCX , 未安装".点数1.0.2.知道为什么吗?提前致谢. (2认同)
  • 也有这个问题,原来这个软件包安装在一个奇怪的位置,并且当它实际上没有被卸载时,pip会说"Uninstalled successfully".您可以通过执行以下操作找到它:`python -c'import X; 帮助(X)'`并删除文件夹. (2认同)