成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

如何在Ubuntu上安裝pip

系統(tǒng) Linux 后端
pip 是一個(gè)命令行工具,允許你安裝 Python 編寫的軟件包。 學(xué)習(xí)如何在 Ubuntu 上安裝 pip 以及如何使用它來安裝 Python 應(yīng)用程序。

[[246137]]

pip 是一個(gè)命令行工具,允許你安裝 Python 編寫的軟件包。 學(xué)習(xí)如何在 Ubuntu 上安裝 pip 以及如何使用它來安裝 Python 應(yīng)用程序。

有許多方法可以在 Ubuntu 上安裝軟件。 你可以從軟件中心安裝應(yīng)用程序,也可以從下載的 DEB 文件、PPA(LCTT 譯注:PPA 即 Personal Package Archives,個(gè)人軟件包集)、Snap 軟件包,也可以使用 Flatpak、使用 AppImage,甚至用舊的源代碼安裝方式。

還有一種方法可以在 Ubuntu 中安裝軟件包。 它被稱為 pip,你可以使用它來安裝基于 Python 的應(yīng)用程序。

什么是 pip

pip 代表 “pip Installs Packages”。 pip 是一個(gè)基于命令行的包管理系統(tǒng)。 用于安裝和管理 Python 語言編寫的軟件。

你可以使用 pip 來安裝 Python 包索引(PyPI)中列出的包。

作為軟件開發(fā)人員,你可以使用 pip 為你自己的 Python 項(xiàng)目安裝各種 Python 模塊和包。

作為最終用戶,你可能需要使用 pip 來安裝一些 Python 開發(fā)的并且可以使用 pip 輕松安裝的應(yīng)用程序。 一個(gè)這樣的例子是 Stress Terminal 應(yīng)用程序,你可以使用 pip 輕松安裝。

讓我們看看如何在 Ubuntu 和其他基于 Ubuntu 的發(fā)行版上安裝 pip

如何在 Ubuntu 上安裝 pip

默認(rèn)情況下,pip 未安裝在 Ubuntu 上。 你必須首先安裝它才能使用。 在 Ubuntu 上安裝 pip 非常簡單。 我馬上展示給你。

Ubuntu 18.04 默認(rèn)安裝了 Python 2 和 Python 3。 因此,你應(yīng)該為兩個(gè) Python 版本安裝 pip

pip,默認(rèn)情況下是指 Python 2。pip3 代表 Python 3 中的 pip。

注意:我在本教程中使用的是 Ubuntu 18.04。 但是這里的教程應(yīng)該適用于其他版本,如Ubuntu 16.04、18.10 等。你也可以在基于 Ubuntu 的其他 Linux 發(fā)行版上使用相同的命令,如 Linux Mint、Linux Lite、Xubuntu、Kubuntu 等。

為 Python 2 安裝 pip

首先,確保已經(jīng)安裝了 Python 2。 在 Ubuntu 上,可以使用以下命令進(jìn)行驗(yàn)證。

  1. python2 --version

如果沒有錯(cuò)誤并且顯示了 Python 版本的有效輸出,則說明安裝了 Python 2。 所以現(xiàn)在你可以使用這個(gè)命令為 Python 2 安裝 pip

  1. sudo apt install python-pip

這將安裝 pip 和它的許多其他依賴項(xiàng)。 安裝完成后,請(qǐng)確認(rèn)你已正確安裝了 pip

  1. pip --version

它應(yīng)該顯示一個(gè)版本號(hào),如下所示:

  1. pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

這意味著你已經(jīng)成功在 Ubuntu 上安裝了 pip

為 Python 3 安裝 pip

你必須確保在 Ubuntu 上安裝了 Python 3。 可以使用以下命令檢查一下:

  1. python3 --version

如果顯示了像 Python 3.6.6 這樣的數(shù)字,則說明 Python 3 在你的 Linux 系統(tǒng)上安裝好了。

現(xiàn)在,你可以使用以下命令安裝 pip3

  1. sudo apt install python3-pip

你應(yīng)該使用以下命令驗(yàn)證 pip3 是否已正確安裝:

  1. pip3 --version

它應(yīng)該顯示一個(gè)這樣的數(shù)字:

  1. pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

這意味著 pip3 已成功安裝在你的系統(tǒng)上。

如何使用 pip 命令

現(xiàn)在你已經(jīng)安裝了 pip,讓我們快速看一些基本的 pip 命令。 這些命令將幫助你使用 pip 命令來搜索、安裝和刪除 Python 包。

要從 Python 包索引 PyPI 中搜索包,可以使用以下 pip 命令:

  1. pip search <search_string>

例如,如果你搜索“stress”這個(gè)詞,將會(huì)顯示名稱或描述中包含字符串“stress”的所有包。

  1. pip search stress
  2. stress (1.0.0) - A trivial utility for consuming system resources.
  3. s-tui (0.8.2) - Stress Terminal UI stress test and monitoring tool
  4. stressypy (0.0.12) - A simple program for calling stress and/or stress-ng from python
  5. fuzzing (0.3.2) - Tools for stress testing applications.
  6. stressant (0.4.1) - Simple stress-test tool
  7. stressberry (0.1.7) - Stress tests for the Raspberry Pi
  8. mobbage (0.2) - A HTTP stress test and benchmark tool
  9. stresser (0.2.1) - A large-scale stress testing framework.
  10. cyanide (1.3.0) - Celery stress testing and integration test support.
  11. pysle (1.5.7) - An interface to ISLEX, a pronunciation dictionary with stress markings.
  12. ggf (0.3.2) - global geometric factors and corresponding stresses of the optical stretcher
  13. pathod (0.17) - A pathological HTTP/S daemon for testing and stressing clients.
  14. MatPy (1.0) - A toolbox for intelligent material design, and automatic yield stress determination
  15. netblow (0.1.2) - Vendor agnostic network testing framework to stress network failures
  16. russtress (0.1.3) - Package that helps you to put lexical stress in russian text
  17. switchy (0.1.0a1) - A fast FreeSWITCH control library purpose-built on traffic theory and stress testing.
  18. nx4_selenium_test (0.1) - Provides a Python class and apps which monitor and/or stress-test the NoMachine NX4 web interface
  19. physical_dualism (1.0.0) - Python library that approximates the natural frequency from stress via physical dualism, and vice versa.
  20. fsm_effective_stress (1.0.0) - Python library that uses the rheological-dynamical analogy (RDA) to compute damage and effective buckling stress in prismatic shell structures.
  21. processpathway (0.3.11) - A nifty little toolkit to create stress-free, frustrationless image processing pathways from your webcam for computer vision experiments. Or observing your cat.

如果要使用 pip 安裝應(yīng)用程序,可以按以下方式使用它:

  1. pip install <package_name>

pip 不支持使用 tab 鍵補(bǔ)全包名,因此包名稱需要準(zhǔn)確指定。 它將下載所有必需的文件并安裝該軟件包。

如果要?jiǎng)h除通過 pip 安裝的 Python 包,可以使用 pip 中的 uninstall 選項(xiàng)。

  1. pip uninstall <installed_package_name>

你可以在上面的命令中使用 pip3 代替 pip。 

責(zé)任編輯:龐桂玉 來源: Linux中國
相關(guān)推薦

2019-08-02 15:30:42

UbuntuMongoDB命令

2019-08-30 11:20:28

UbuntuVirtualBoxLinux

2024-01-04 11:50:00

UbuntuDocker

2023-08-08 12:38:52

2015-10-16 10:07:22

Justniffer安裝Ubuntu

2021-09-11 15:41:55

UbuntuDropbox云服務(wù)

2017-03-29 16:18:11

LinuxUbuntuRedmine

2013-07-25 10:00:30

UbuntuVirtualBox

2021-07-12 14:47:16

UbuntuZlib代碼

2017-08-02 15:15:55

UbuntuNoSQLOrientDB

2019-10-21 13:28:38

UbuntuPostgreSQL命令

2018-05-25 11:55:41

2022-05-29 17:37:39

LinuxUbuntuPHP

2018-09-30 10:35:29

UbuntuCinnamon桌面環(huán)境

2023-11-04 21:40:58

UbuntuLibreOffic

2023-09-12 10:23:28

2015-11-30 14:33:36

Intel GraphLinuxUbuntu

2020-03-20 18:19:05

UbuntuLinuxNetbeans

2010-09-08 13:49:36

2020-04-08 12:20:25

UbuntuLinuxOracle Java
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)

主站蜘蛛池模板: 亚洲91 | 黄色一级大片在线免费看产 | 日本网站在线看 | 亚洲欧美日韩中文字幕一区二区三区 | a免费视频| 婷婷久久网 | 精品三级在线观看 | 欧美激情久久久 | 久久久久免费 | 欧美日韩在线一区二区三区 | 91精品国产综合久久国产大片 | 最近中文字幕第一页 | 国产一区二区不卡 | 一区二区免费在线 | 华丽的挑战在线观看 | 超碰97免费| 亚洲综合小视频 | 国产精品.xx视频.xxtv | 97精品超碰一区二区三区 | 亚洲天堂精品久久 | 日韩精品一区二区三区在线 | 一区二区三区免费观看 | 91精品国产综合久久久久久丝袜 | 亚洲高清av在线 | 嫩草网| 日韩一区二区在线免费观看 | 午夜欧美 | 成人午夜在线视频 | 欧美不卡一区二区 | 国产精品免费一区二区三区四区 | 天天操天天干天天爽 | 91精品国产92 | 午夜a级理论片915影院 | 亚洲精品久久久久久久不卡四虎 | 成人影| 精品国产免费一区二区三区演员表 | 国产免费va | 九九热这里 | 中文字幕一区二区三区四区五区 | 欧美xxxx色视频在线观看免费 | 色综合一区 |