Python 刪除已安裝的模組或包

2021-08-22 08:51:45 字數 716 閱讀 8655

**:

方法一: 使用pip

安裝pip

$ wget

$ python get-pip.py 

刪除指定的模組或者包, 在命令提示符cmd下用如下命令:

pip uninstall *** 

如:pip uninstall pycurl

方法二:手工刪除

去python的第三方模組或包的存放位置進行手工刪除檔案和資料夾,然後刪除easy-install.pth檔案中的相應的行。python的模組和包的預設存放位置請檢視博文

to uninstall an .egg you need to rm -rf the egg (it might be a directory) and remove the matching line from site-packages/easy-install.pth

pip是乙個很方便的工具, 可以方便安裝, 列出, 解除安裝python的模組/庫/包等

常見使用, 例如:

cmd下:

安裝pycurl包

pip install pycurl

列出已經安裝的python包

pip list

輸出pycurl包的資訊

pip show pycurl

解除安裝pycurl包

pip uninstall pycurl

Python檢視已安裝的模組

在學習python的時候 不可避免的遇到python模組安裝的問題 用easy install和pip 可以方便的安裝和解除安裝python模組,但是不知道怎麼 檢視已經安裝的模組,今天發現用help函式可以 help modules help modules 會把所有已經安裝的模組 列出來 如果不...

python刪除安裝的模組

上篇講述了如何用distutils模組來建立分發包,那麼安裝了模組之後,怎麼來刪除呢,具體的步驟如下 root ftp ansible ls l usr share kel rw r r 1 root root 86 may 9 09 23 usr share kel root ftp ansibl...

LINUX刪除或解除安裝已安裝好的RPM包

查詢包的安裝情況 rmp qa grep 包名1,現 實情況往往是你想刪除或解除安裝 已安裝好的 軟體。但你可能只知道這個軟體安裝好後的檔名是什麼,此時可以先用which或其find找到你想刪除的檔案 查刪除的檔案 根據檔案查出所對應的rpm包名 執行刪除 error failed dependen...