poetry
上記記事はモチベーションが似てる
その時はpyenvは使わない
PoetryはPythonのパッケージマネージャの一つです。v1.0になったのが2019年末なのでまだまだ新しいツールです。pipと同じようにパッケージをpypiなどからダウンロードしてきてインストールすることができますが、それに加えて次のようなこともできます。 パッケージ管理ファイルの生成・変更
インストールされているパッケージのアップデート
プロジェクトごとの仮想環境のセットアップ
などなど...
インストールする
2022/9/19 09:11現在,上記Qittaの方法は古くなっている
The previous get-poetry.py and install-poetry.py installers are deprecated. Any installs performed using get-poetry.py should be uninstalled and reinstalled using install.python-poetry.org to ensure in-place upgrades are possible.
公式HPの方法でインストールを試みる。
~/.zshrcの編集
code:.zshrc
export PATH="/Users/${USER}/.local/bin:$PATH"
以下のようなエラーが出て困った時のメモ
RuntimeError
The Poetry configuration is invalid:
- Additional properties are not allowed ('group' was unexpected)
これで治った
アンインストール→再インストール
$ rm -rf /Users/myusername/.poetry
$ poetry install
2023/6/25
このWarningが出てきた
Consider moving configuration to <my_home_dir>/Library/Preferences/pypoetry, as support for the legacy directory will be removed in an upcoming release.
$ mv ~/Library/Application\ Support/pypoetry ~/Library/Preferences/pypoetry