LoginSignup
46
58

More than 5 years have passed since last update.

Pipenvコマンドメモ

Posted at

Pipenvとは

virtualenv と pipでのパッケージ管理を簡易的に行えるようになるツール。
Pipfileと呼ばれるファイルにライブラリ情報を記載し、そこから仮想環境の構築、管理が行える。

公式
https://pipenv-ja.readthedocs.io/ja/translate-ja/

基本コマンド

pipenv install
# ディレクトリ内にPipfile Pipfile.lockを作成
# 既にある場合はPipfileを元に仮想環境が構築される

pipenv install [package]
# 仮想環境にライブラリをインストールする
# インストール後、Pipfileに追加される
# version指定も可能

pipenv uninstall [package]
# 仮想環境のライブラリ削除
# Pipfileからも削除される
# ※依存ライブラリは削除されない

pipenv shell
# 仮想環境を有効化する

pipenv run [コマンド]
# 仮想環境でコマンドを実行

pipenv --rm
# 仮想環境を削除

pipenv --venv
# 仮想環境のパスを確認できる
46
58
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
46
58