如何使用 pip 卸载可编辑包(使用 -e 安装) [英] How to uninstall editable packages with pip (installed with -e)

查看:89
本文介绍了如何使用 pip 卸载可编辑包(使用 -e 安装)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 -e 安装了一些软件包

I have installed some packages with -e

> pip install -e git+https://github.com/eventray/horus.git@2ce62c802ef5237be1c6b1a91dbf115ec284a619#egg=horus-dev

我看到了 pip 冻结

I with pip freeze I see

> pip freeze
...
-e git+https://github.com/eventray/horus.git@2ce62c802ef5237be1c6b1a91dbf115ec284a619#egg=horus-dev
...

当我尝试卸载软件包时出现错误:

when I try to uninstall the packages I get errors:

> pip uninstall horus-dev
Cannot uninstall requirement horus-dev, not installed

> pip uninstall horus
Cannot uninstall requirement horus, not installed

如何卸载这样的包?

推荐答案

{virtualenv}/lib/python2.7/site-packages/ (如果不使用 virtualenv 那么 {system_dir}/lib/python2.7/dist-packages/)

At {virtualenv}/lib/python2.7/site-packages/ (if not using virtualenv then {system_dir}/lib/python2.7/dist-packages/)

  • 删除egg文件(例如distribute-0.6.34-py2.7.egg),如果有的话
  • 从文件 easy-install.pth 中删除相应的行(它应该是源目录或egg 文件的路径).
  • remove the egg file (e.g. distribute-0.6.34-py2.7.egg) if there is any
  • from file easy-install.pth, remove the corresponding line (it should be a path to the source directory or of an egg file).

这篇关于如何使用 pip 卸载可编辑包(使用 -e 安装)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆