Pip
pip("Pip Installs Packages"または"Pip Installs Python"や"Package Installer for Python"など諸説ある)はPythonで書かれたパッケージソフト�…
pip --helpの出力画面 | |
| 最新版 | |
|---|---|
| リポジトリ | |
| プログラミング 言語 | Python |
| 対応OS | クロスプラットフォーム |
| 種別 | パッケージ管理システム |
| 公式サイト |
www |
pip("Pip Installs Packages"または"Pip Installs Python"や"Package Installer for Python"など諸説ある)はPythonで書かれたパッケージソフトウェアをインストール・管理するためのパッケージ管理システムである。多くのPythonパッケージは、Python Package Index (PyPI) 上にある[2]。
pipはPython 2.7.9以降、Python 3.4以降からデフォルトで付属するようになった[3]。
コマンドラインインターフェース

pip install virtualenvの出力画面pipを用いる主な利点は、コマンドラインインターフェースで簡単にPythonのパッケージソフトウェアをインストールできることである。次の一行でパッケージのインストールを行える。
pip install some-package-name
パッケージをアンインストールするときも同様に一行でできる。
pip uninstall some-package-name
pipで一番重要な機能は、ファイルに必要なパッケージのリストとそのバージョンを書いておけば簡単にパッケージ管理を行えるという点である[2]。この機能は他のコンピュータや仮想環境に同じPythonの環境を用意するときに非常に役に立つ。この機能を使うには、適切なフォーマットで必要なパッケージを「requirements.txt」ファイルに書き、次のコマンドを実行すればよい[4]。
pip install -r requirements.txt
またpipはsdistをinstallできる(例: pip install git+https://github.com/...)。この際 setuptools(setup.py/setup.cfg)以外のビルドシステムをpyproject.toml(PEP 518)に指定できる[5]。
webホスティングサービスへの利用
pipはHerokuが提供しているようなwebホスティングサービスをサポートするためにも使われる[6]。
脚注
- ^ “Release 26.2.1” (2026年8月4日). 2026年8月5日閲覧。
- ^ a b “pip documentation”. The pip developers. 2012年1月5日閲覧。
- ^ “pip installation”. 2015年2月24日閲覧。
- ^ “Mastering `requirements.txt` in Python: A Comprehensive Guide”. coderivers.org. 2025年9月17日閲覧。
- ^ "pip supports projects declaring dependencies that are required at install time using a pyproject.toml file" pip
- ^ “Getting Started with Python on Heroku/Cedar”. Dev Center. Heroku. 2012年1月5日閲覧。
関連項目
外部リンク
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.