python软件包的卸载

来源:互联网 发布:韩妆淘宝店推荐 编辑:程序博客网 时间:2024/05/08 12:51

  昨天给我所需要的仿真包的作者写了个邮件,今天收到了回复。他承认网上放着的程序并不完善,并告诉我到哪去下载以前的稳定版,但功能要少很多。看来这个老外还是很友好的,以后可能要和他多多交流一下。

  在下载了一个较老的版本后,我面临了一个新问题——如何卸载从源代码安装的python软件包。一般从二进制预编译版安装的,均可以从Windows的添加/删除程序那里卸载,而自己编译的咋办?难道只能有手工删除吗,会不会删不全呢?

      在网上搜索了一下发现,情况还真不乐观,除了少量用了某些特殊的软件发布工具安装的可以方便卸载外,还真是要人工删除。

 

How do I uninstall Python packages that have been built from source and installed via...

python setup.py build python setup.py install 

If your package provider didn't produce a setup.py uninstall method then, more often than not,

you can just manually remove the package from your Python's site-packages directory.

This will be located at /usr/lib/python2.5/site-packages or equivalent for your distro and version of Python.

Within that there will be either a directory or a .egg file corresponding to the package's name.

Simply delete that.There are some instances where packages will install stuff elsewhere.

Django for instance installs django-admin.py to /usr/sbin. Y

our best bet is to run setup.py install again, make a note of what it is installing where and then cleanup.

	
				
		
原创粉丝点击