2017/11/13

最近 pipenv を使っているのでメモ

Pipfile の作成

cd path/to/dir
% pipenv --python 3.6

Pipfile にモジュールを追加

% pipenv install django
Installing django…
Collecting django
  Downloading Django-1.11.7-py2.py3-none-any.whl (6.9MB)
Collecting pytz (from django)
  Downloading pytz-2017.3-py2.py3-none-any.whl (511kB)
Installing collected packages: pytz, django
Successfully installed django-1.11.7 pytz-2017.3

Adding django to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (374a8f)!
pipenv install django  8.40s user 10.43s system 64% cpu 29.142 total

shell に venv 環境を読み込む

% pipenv shell