日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 综合教程 >内容正文

综合教程

pip怎么卸载安装包_pip怎么卸载

發(fā)布時(shí)間:2023/12/15 综合教程 36 生活家
生活随笔 收集整理的這篇文章主要介紹了 pip怎么卸载安装包_pip怎么卸载 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Python Pip command provides search, install, update, uninstall packages. We can use pip command to uninstall packages easily even there are some alternatives like easy_install.

Python Pip命令提供搜索,安裝,更新,卸載軟件包。 即使有easy_install之類的替代方法,我們也可以使用pip命令輕松卸載軟件包。

用Pip列出已經(jīng)安裝的Python軟件包 (List Already Installed Python Packages with Pip)

Before uninstalling or removing Python packages with pip we will list already installed Python packages. We will use list command for pip like below.

在通過pip卸載或刪除Python軟件包之前,我們將列出已安裝的Python軟件包。 我們將如下所示對(duì)pip使用list命令。

$ pip list
List Already Installed Python Packages with Pip
用Pip列出已經(jīng)安裝的Python軟件包

We can see that the following information is provided by listing installed packages.

通過列出已安裝的軟件包,我們可以看到以下信息。

  • `Package` column shows the package complete name

    “包裹”列顯示包裹的完整名稱

  • `Version` column shows the most recent version of the given package

    “版本”列顯示了給定軟件包的最新版本

列出/顯示Python軟件包信息,版本(List/Display Python Packages Information, Version)

We can also show a given package complete information with the show command which can be useful before uninstalling it. In this example, we will show information about the Python package named Django.

我們還可以使用show命令顯示給定的軟件包完整信息,這在卸載之前可能很有用。 在此示例中,我們將顯示有關(guān)名為Django的Python軟件包的信息。

$ pip show django
List/Display Python Packages Information, Version
列出/顯示Python軟件包信息,版本

使用Pip,Pip2,Pip3卸載/刪除Python軟件包(Uninstall/Remove Python Package with Pip, Pip2, Pip3)

We can uninstall the package with the uninstall pip command. We will also provide the package name. In this example, we will uninstall the package named django.

我們可以使用uninstall pip命令來(lái)卸載軟件包。 我們還將提供包裹名稱。 在此示例中,我們將卸載名為django的軟件包。

$ pip uninstall django
Uninstall/Remove Python Package with Pip
使用Pip卸載/刪除Python軟件包

We can see that the directories and files removed are listed and a confirmation is shown where we will input y in order to accept the removal. After the remove/uninstall completed we will be shown Successfully uninstalled Django-2.2.5

我們可以看到列出了刪除的目錄和文件,并顯示了一個(gè)確認(rèn),我們將在其中輸入y以接受刪除。 刪除/卸載完成后,我們將顯示Successfully uninstalled Django-2.2.5

If we want to remove packages related to the Python2 we can use the same command for the pip2command like below.

如果我們想刪除與Python2相關(guān)的軟件包,我們可以對(duì)pip2命令使用相同的命令,如下所示。

$ pip2 uninstall django

If we want to remove packages related to the Python3 we can use the same command for the pip3command like below.

如果我們想刪除與Python3相關(guān)的軟件包,我們可以對(duì)pip3命令使用相同的命令,如下所示。

$ pip3 uninstall django

使用Pip卸載/刪除具有要求的Python軟件包 (Uninstall/Remove Python Package with Requirements with Pip)

Modern Python applications and projects provide the required files in order to list the package list which should be installed. We can use this requirement file in order to specify the packages we have to remove the requirement file. In this example, the requirement file contains the following content with the name of requirements.txt.

現(xiàn)代Python應(yīng)用程序和項(xiàng)目提供了必需的文件,以便列出應(yīng)安裝的軟件包列表。 我們可以使用此需求文件來(lái)指定必須刪除需求文件的軟件包。 在此示例中,需求文件包含以下內(nèi)容,其名稱為requirements.txt

django
pycups
PyGObject
PyJWT
pymacaroons
PyNaCl
pyRFC3339

AND we will remove this requirements.txt file content like below.

并且我們將刪除此requirements.txt文件內(nèi)容,如下所示。

$ pip uninstall requirements.txt

無(wú)需詢問Pip即可卸載/刪除Python軟件包 (Uninstall/Remove Python Package Without Asking Confirmation with Pip)

By default the package uninstallation or removal requires a confirmation from the user. This is generally providing the y which is a short form of Yes to accept package uninstall. We can automatically accept the confirmation and skip it with the -y or --yes option like below.

默認(rèn)情況下,軟件包的卸載或刪除需要用戶的確認(rèn)。 通常,這是提供y形式, Yes接受軟件包卸載的縮寫。 我們可以自動(dòng)接受確認(rèn),并使用-y--yes選項(xiàng)跳過它,如下所示。

$ pip uninstall -y django

$ pip2 uninstall -y django

$ pip3 uninstall -y django

使用Pip卸載/刪除特定用戶的Python軟件包 (Uninstall/Remove Python Package For Specific User with Pip)

pip Python packages may be installed for a specific user into the users home directory. So we can uninstall given python package for a specific user with the --user option by providing the user name. In this example, we will remove packages for the current user.

pip Python軟件包可以為特定用戶安裝到用戶的主目錄中。 因此,我們可以使用--user選項(xiàng)通過提供用戶名來(lái)卸載特定用戶的給定python軟件包。 在此示例中,我們將刪除當(dāng)前用戶的軟件包。

$ pip uninstall --user django

$ pip2 uninstall --user django

$ pip3 uninstall --user django

使用easy_install卸載/刪除Python軟件包 (Uninstall/Remove Python Package with easy_install)

We can also use the easy_install command in order to remove installed python packages. We will use -m option and provide the package name. In this example, we will remove the package named django with the easy_install command.

我們還可以使用easy_install命令來(lái)刪除已安裝的python軟件包。 我們將使用-m選項(xiàng)并提供軟件包名稱。 在此示例中,我們將使用easy_install命令刪除名為django的軟件包。

$ easy_install -m django

.ue6353ce88552e6dbc1e8148a68b93656 , .ue6353ce88552e6dbc1e8148a68b93656 .postImageUrl , .ue6353ce88552e6dbc1e8148a68b93656 .centered-text-area{min-height:80px;position:relative;}
.ue6353ce88552e6dbc1e8148a68b93656 , .ue6353ce88552e6dbc1e8148a68b93656:hover , .ue6353ce88552e6dbc1e8148a68b93656:visited , .ue6353ce88552e6dbc1e8148a68b93656:active{border:0!important;}
.ue6353ce88552e6dbc1e8148a68b93656 .clearfix:after{content:"";display:table;clear:both;}
.ue6353ce88552e6dbc1e8148a68b93656{display:block;transition:background-color 250ms;webkit-transition:background-color 250ms;width:100%;opacity:1;transition:opacity 250ms;webkit-transition:opacity 250ms;background-color:#ECF0F1;box-shadow:0 1px 2px rgba(0, 0, 0, 0.17);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.17);-o-box-shadow:0 1px 2px rgba(0, 0, 0, 0.17);-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.17);}
.ue6353ce88552e6dbc1e8148a68b93656:active , .ue6353ce88552e6dbc1e8148a68b93656:hover{opacity:1;transition:opacity 250ms;webkit-transition:opacity 250ms;background-color:#D35400;}
.ue6353ce88552e6dbc1e8148a68b93656 .centered-text-area{width:100%;position:relative;}
.ue6353ce88552e6dbc1e8148a68b93656 .ctaText{border-bottom:0 solid #fff;color:#3498DB;font-size:16px;font-weight:bold;margin:0;padding:0;text-decoration:underline;}
.ue6353ce88552e6dbc1e8148a68b93656 .postTitle{color:#27AE60;font-size:16px;font-weight:600;margin:0;padding:0;width:100%;}
.ue6353ce88552e6dbc1e8148a68b93656 .ctaButton{background-color:#e6e6e6!important;color:#3498DB;border:none;border-radius:3px;box-shadow:none;font-size:14px;font-weight:bold;line-height:26px;moz-border-radius:3px;text-align:center;text-decoration:none;text-shadow:none;width:80px;min-height:80px;background:url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat;position:absolute;right:0;top:0;}
.ue6353ce88552e6dbc1e8148a68b93656:hover .ctaButton{background-color:#E67E22!important;}
.ue6353ce88552e6dbc1e8148a68b93656 .centered-text{display:table;height:80px;padding-left:18px;top:0;}
.ue6353ce88552e6dbc1e8148a68b93656 .ue6353ce88552e6dbc1e8148a68b93656-content{display:table-cell;margin:0;padding:0;padding-right:108px;position:relative;vertical-align:middle;width:100%;}
.ue6353ce88552e6dbc1e8148a68b93656:after{content:"";display:block;clear:both;}

LEARN MORE How To Install Numpy For Linux?

.ue6353ce88552e6dbc1e8148a68b93656 , .ue6353ce88552e6dbc1e8148a68b93656 .postImageUrl , .ue6353ce88552e6dbc1e8148a68b93656 .centered-text-area{min-height:80px;position:relative;}
.ue6353ce88552e6dbc1e8148a68b93656 , .ue6353ce88552e6dbc1e8148a68b93656:hover , .ue6353ce88552e6dbc1e8148a68b93656:visited , .ue6353ce88552e6dbc1e8148a68b93656:active{border:0!important;}
.ue6353ce88552e6dbc1e8148a68b93656 .clearfix:after{content:"";display:table;clear:both;}
.ue6353ce88552e6dbc1e8148a68b93656{display:block;transition:background-color 250ms;webkit-transition:background-color 250ms;width:100%;opacity:1;transition:opacity 250ms;webkit-transition:opacity 250ms;background-color:#ECF0F1;box-shadow:0 1px 2px rgba(0, 0, 0, 0.17);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.17);-o-box-shadow:0 1px 2px rgba(0, 0, 0, 0.17);-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.17);}
.ue6353ce88552e6dbc1e8148a68b93656:active , .ue6353ce88552e6dbc1e8148a68b93656:hover{opacity:1;transition:opacity 250ms;webkit-transition:opacity 250ms;background-color:#D35400;}
.ue6353ce88552e6dbc1e8148a68b93656 .centered-text-area{width:100%;position:relative;}
.ue6353ce88552e6dbc1e8148a68b93656 .ctaText{border-bottom:0 solid #fff;color:#3498DB;font-size:16px;font-weight:bold;margin:0;padding:0;text-decoration:underline;}
.ue6353ce88552e6dbc1e8148a68b93656 .postTitle{color:#27AE60;font-size:16px;font-weight:600;margin:0;padding:0;width:100%;}
.ue6353ce88552e6dbc1e8148a68b93656 .ctaButton{background-color:#e6e6e6!important;color:#3498DB;border:none;border-radius:3px;box-shadow:none;font-size:14px;font-weight:bold;line-height:26px;moz-border-radius:3px;text-align:center;text-decoration:none;text-shadow:none;width:80px;min-height:80px;background:url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat;position:absolute;right:0;top:0;}
.ue6353ce88552e6dbc1e8148a68b93656:hover .ctaButton{background-color:#E67E22!important;}
.ue6353ce88552e6dbc1e8148a68b93656 .centered-text{display:table;height:80px;padding-left:18px;top:0;}
.ue6353ce88552e6dbc1e8148a68b93656 .ue6353ce88552e6dbc1e8148a68b93656-content{display:table-cell;margin:0;padding:0;padding-right:108px;position:relative;vertical-align:middle;width:100%;}
.ue6353ce88552e6dbc1e8148a68b93656:after{content:"";display:block;clear:both;} 了解更多如何為L(zhǎng)inux安裝Numpy?

翻譯自: https://www.poftut.com/how-to-uninstall-a-package-with-pip/

總結(jié)

以上是生活随笔為你收集整理的pip怎么卸载安装包_pip怎么卸载的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。