Poetry
#pipenv から乗り換えしようと。
python-poetry/poetry: Python dependency management and packaging made easy.
In other words, poetry uses pyproject.toml to replace setup.py, requirements.txt, setup.cfg, MANIFEST.in and the newly added Pipfile
setup.py, requirements.txt setup.cfgを tomlで置き換えて、合理化する。
ぐぐると、Docker利用の話がたくさんでてくる。
pyproject.toml, poetry.lockをcopyして、
poerty export -f requirements.txt > requirements.txt
して、pip install -r requirements.txtをする形?
環境を作り直し
How to rebuild Poetry environment from scratch and force reinstall everything? - Stack Overflow
ライブラリなどの試行錯誤で、要らないものが出てきた場合に。
nodejsなどでは、node_modules自体を消して、installし直しみたいな作業をするが(もっと良い方法ある?)
poetryは、~/.cache/pypoetry/virtualenv/...に個別の環境を作る。
ディレクトリ名は、開発ディレクトリになにかのハッシュ文字みたいなものがつくけど、
再度作り直しでも同じ文字になる(よう)なので、vscodeのinterpreterのパス設定などはそのままで(たぶん)よい。
poetry run
cronでの利用は、poetryが作るvirtualenvのpythonのpathで実行すれば...できないので、以下の形
【Poetry】cronを使って、スクリプトを好きな時間に自動実行|venv環境での対処法 – クリワン