怎麼刪除python安裝包

藏色散人
發布: 2019-07-01 11:23:52
原創
5534 人瀏覽過

怎麼刪除python安裝包

怎麼刪除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 you want to delete the currently installed version of a package (or all versions of a version 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安裝包的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!