怎样删除python装置包
python 装置模块,平常pip 或许 python setup.py install..反之 卸载的话,平常是直接删除module 文件夹,或许经由过程record纪录去自动删除,细致以下。
一、源码包装置的删除
我们运用 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
二、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装置包的细致内容,更多请关注ki4网别的相干文章!