LoginSignup
2
4

More than 3 years have passed since last update.

pip コマンド集

Posted at

pythonを使う上で必要なpipコマンドをまとめておきます.

パッケージのインストール

-Uは最新のバージョンに更新する際に使用
--quitや--proxyや-e(--editable)などのオプションも可
--eはインプレースでインストールするため,gitなどから開発中のソースコードをインストールし編集された場合でも,再インストールの必要がない

pip install -U Flask

パッケージのアンインストール

確認が不要な場合は-y

pip uninstall -y Flask

バージョン確認

pip --version

インストール済みのパッケージとそのバージョンの一覧をrequirementsフォーマットで表示

pip freeze

インストール済みのパッケージの一覧を表示

--outdatedは古いパッケージを表示

pip list

インストール済みのパッケージの情報を表示

pip show Flask

ヘルプ

pip install -h

pip freeze の出力をrequirements.txtに保存

pip freeze > requirements.txt

requirements.txtからインストール

-rで元のrequirements.txtとの差分を確認

pip install -r requirements.txt
2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4