LoginSignup
6
10

More than 3 years have passed since last update.

pipenv環境構築まとめ

Last updated at Posted at 2019-06-17

□2018年のPythonプロジェクトのはじめかた - Qiita
https://qiita.com/sl2/items/1e503952b9506a0539ea
に刺激を受けて,pipenvの設定をまとめてみました.
公式ドキュメント

インストール

pipでinstall

pip install --user pipenv
pipenv --version

必須コマンド

Pipfileがない場合,Pipfileを作成

pipenv install 

必要に応じてライブラリをインストール

pipenv install **library**

必要に応じてライブラリをuninstall

pipenv uninstall **library**

環境をactivate

pipenv shell 

pipfileの[scripts]の中に実行コマンドを作成する

pipenv run **command**

その他の重要コマンド

show dependencies of python library

pipenv graph

activate virtualenv

pipenv shell

check security

pipenv check

execute on virtual environment

pipenv run *comamnd*

command you make in pipfile [scripts]
[scipts]
start="python manage.py runserver "

pipfile.lockからインストール

pipenv sync

Pipenv環境自体の削除

pipenv --rm 

update

pipenv update 

out of pipenv shell

exit 

check the dependent package from one library

pipenv graph —reverse

環境構築時のError

ModuleNotFoundError: No module named ‘_sqlite3’

===>
sudo apt install libsqlite3-dev 
pipenv --rm 
pipenv install --python 3.6.5
6
10
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
6
10