如何使用pip3或任何其他方式干净地卸载我的python包?

Raj*_*rma 8 uninstall pip setuptools python-3.4

这是我的setup.py文件,用于安装我的python程序,安装后使用python3 setup.py install我的程序的条目创建命名testmain,当我在其输出中pip3 freeze显示abc==0.1它时,所以我使用pip3卸载它pip3 uninstall abc,虽然软件包已卸载但在那里仍然存在testmain我的路径上的条目,是否有一种方式,pip3也在卸载过程中删除此条目或任何其他方式,我可以在相同的方案下干净地卸载我的程序?

from setuptools import setup

setup(name='abc',
      version='0.1',
      description='test',
      url='http://github.com/rjdp',
      author='rajdeep',
      author_email='rajdeep.sharma@rtcamp.com',
      license='MIT',
      packages=['cli'],
      install_requires=[
      'cement',
      ],
      entry_points = {
      'console_scripts': ['testmain=cli.abc:main'],
      },
      zip_safe=False)
Run Code Online (Sandbox Code Playgroud)

Wil*_*ons 19

而不是python3 setup.py安装使用:

pip3 install .
Run Code Online (Sandbox Code Playgroud)

然后

pip3 uninstall abc
Run Code Online (Sandbox Code Playgroud)

这将删除testmain.

我今天遇到了同样的问题,整个上午都试图找出脚本无法卸载的原因.在我看到Ramana的答案之前,没有任何工作:https://askubuntu.com/questions/38692/how-does-one-remove-applications-installed-through-python-setup-py-install

"你应该总是用"pip"安装Python应用程序.pip支持卸载选项." 以及关于如何支持本地路径的公告中的示例.