怎么删除python安装包-Python教程

资源魔 43 0

怎样删除了python装置包

python 装置模块,普通pip 或许 python setup.py install..反之 卸载的话,普通是间接删除了module 文件夹,或许经过record记载去主动删除了,详细以下。

1、源码包装置的删除了

咱们应用 python setup.py install 来装置python包,然而若何卸载呢?

只能手动删除了装置的文件,能够应用以下饬令:

linux下的删除了:

# python setup.py install --record files.txt 记载装置后文件的门路

# cat files.txt | xargs rm -rf 删除了这些文件

windows下的删除了:

C:\selenium-2.43.0>python setup.py install --record ./record.txt

C:\selenium-2.43.0>FOR /F %f in (record.txt) DO del %f

2、easy_install 装置的删除了

如下从豆瓣上看到办法

If you have replaced a package with another version, then you can just delete the package(s) you don't need by deleting the PackageName-versioninfo.egg file or directory (found in the installation directory).

If you want to delete the currently installed version of a package (or all versions of a package), you should first run:

easy_install -m PackageName

This will ensure that Python doesn't continue to search for a package you're planning to remove. After you've done this, you can safely delete the .egg files or directories, along with any scripts you wish to remove.

就是运转:easy_install -m PackageName

完了,你正在C:\Python25\Lib\site-packages\下,删除了模块文件夹就行了。

相干保举:《Python教程》

以上就是怎样删除了python装置包的具体内容,更多请存眷资源魔其它相干文章!

标签: Python python教程 python编程 python使用问题

抱歉,评论功能暂时关闭!