LoginSignup
1
0

More than 3 years have passed since last update.

requirements.txtからpipenvに移行する

Last updated at Posted at 2020-05-21

はじめに

まだまだ、Pythonのパッケージ管理にrequirements.txtを使っているなんて方は多いと思います。
わかりやすいですし、検索すると最初に出てくるためそのままという方が多いと思います。

ただ、requiments.txtだとパッケージ同士の依存関係が管理できないため、pipenvpoetryなど様々なパッケージ管理ツールが推奨されています。

今回、requimetns.txtからpipenvに変更することにしたのでそのときの手順をまとめます。
※poetryにはrequimetns.txtをimportする機能がないようです。

手順

  • pipenvのインストール
brew install pipenv
  • requirements.txtからpipenvに移行
pipenv install -r requirements.txt

# 依存関係を定義するlockファイルを生成
pipenv lock
1
0
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
1
0