GNU/Linux >> Linux の 問題 >  >> Ubuntu

Ubuntu14.04にPipをインストールする方法

このチュートリアルでは、Ubuntu14.04サーバーにPipPythonをインストールして構成する方法を説明します。知らない人のために、Pipコマンドはインストール用のツールです。 Python Package IndexにあるようなPythonパッケージを管理します。pipを使用すると、特定のバージョンのパッケージをインストールすることもできます。最も重要なことは、pipには、パッケージの完全なリストと対応するバージョン番号を管理する機能があります。 「requirements」ファイルを介して。easy_installと同じ基本的なジョブを実行しますが、いくつかの追加機能があります。

この記事は、少なくともLinuxの基本的な知識があり、シェルの使用方法を知っていること、そして最も重要なこととして、独自のVPSでサイトをホストしていることを前提としています。インストールは非常に簡単です。 Ubuntu14.04サーバーへのPipの段階的なインストールを示します。

Ubuntu14.04にPipをインストール

手順1.まず、次のapt-getを実行して、すべてのシステムパッケージが最新であることを確認します。 ターミナルのコマンド。

sudo apt-get update
sudo apt-get upgrade

ステップ2.Pipをインストールします。

python-pipと必要なパッケージをインストールします:

apt-get install python-pip

インストールされているPipのバージョンを確認してください:

pip -V

ステップ3.pipコマンドの使用方法。

python-pipパッケージをインストールすると、システムでpipコマンドが使用できるようになります。pipでは複数のオプションを使用できます。 コマンド:

[[email protected] ~]# pip --help

Usage:   
  pip <command></command> [options]

Commands:
  install                     Install packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  zip                         DEPRECATED. Zip individual packages.
  unzip                       DEPRECATED. Unzip individual packages.
  bundle                      DEPRECATED. Create pybundles.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output.
  --log-file            Path to a verbose non-appending log, that only logs failures. This
                              log is active by default at /home/sharad/.pip/pip.log.
  --log                 Path to a verbose appending log. This log is inactive by default.
  --proxy              Specify a proxy in the form [user:passwd@]proxy.server:port.
  --timeout              Set the socket timeout (default 15 seconds).
  --exists-action     Default action when a path already exists: (s)witch, (i)gnore,
                              (w)ipe, (b)ackup.
  --cert                Path to alternate CA bundle.
[[email protected] ~]#

新しいPythonパッケージタイプをインストールするには:

pip install packageName

pip typeでインストールされたPythonパッケージをアンインストールするには:

pip uninstall packageName

Pythonパッケージタイプを検索するには:

pip search packageName

おめでとうございます!Pipが正常にインストールされました。Ubuntu14.04システムにPip Pythonをインストールするためにこのチュートリアルを使用していただき、ありがとうございます。追加のヘルプや役立つ情報については、Pythonの公式Webサイトを確認することをお勧めします。


Ubuntu
  1. Ubuntu16.04にPipをインストールする方法

  2. Ubuntu18.04にpipをインストールする方法

  3. Ubuntu20.04にpipをインストールする方法

  1. Ubuntu18.04にPipをインストールする方法

  2. Ubuntu20.04にRをインストールする方法

  3. Ubuntu18.04にGoをインストールする方法

  1. Ubuntu18.04にRをインストールする方法

  2. Ubuntu20.04にPythonPipをインストールする方法

  3. UbuntuにPipをインストールする方法