Poetry 未使用推荐的安装程序进行安装。无法自动更新
Poetry was not installed with the recommended installer. Cannot update automatically
如何升级到最新版本?
规格:
- Windows10,
- Visual Studio代码,
- Ubuntu Bash.
当前版本:
me@PF2DCSXD:/mnt/c/Users/user/Documents/GitHub/workers-python/workers/composite_key/compositekey/tests$ python3 --version
Python 3.8.10
尝试更新 | poetry self update
:
me@PF2DCSXD:/mnt/c/Users/user/Documents/GitHub/workers-python/workers/composite_key/compositekey/tests$ poetry self update
RuntimeError
Poetry was not installed with the recommended installer. Cannot update automatically.
at ~/.local/lib/python3.8/site-packages/poetry/console/commands/self/update.py:389 in _check_recommended_installation
385│ current = Path(__file__)
386│ try:
387│ current.relative_to(self.home)
388│ except ValueError:
→ 389│ raise RuntimeError(
390│ "Poetry was not installed with the recommended installer. "
391│ "Cannot update automatically."
392│ )
393│
如果我还有什么要补充的,请告诉我post。
错误消息表明您可能已经使用 pip 安装了 poetry
,它不支持自动 poetry
更新。您应该卸载当前安装的 poetry
版本,然后使用使用自定义安装脚本的 the recommended method 重新安装。
在 osx/linux,您只需 运行 curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
下载和 运行 这个安装脚本。
如何升级到最新版本?
规格:
- Windows10,
- Visual Studio代码,
- Ubuntu Bash.
当前版本:
me@PF2DCSXD:/mnt/c/Users/user/Documents/GitHub/workers-python/workers/composite_key/compositekey/tests$ python3 --version
Python 3.8.10
尝试更新 | poetry self update
:
me@PF2DCSXD:/mnt/c/Users/user/Documents/GitHub/workers-python/workers/composite_key/compositekey/tests$ poetry self update
RuntimeError
Poetry was not installed with the recommended installer. Cannot update automatically.
at ~/.local/lib/python3.8/site-packages/poetry/console/commands/self/update.py:389 in _check_recommended_installation
385│ current = Path(__file__)
386│ try:
387│ current.relative_to(self.home)
388│ except ValueError:
→ 389│ raise RuntimeError(
390│ "Poetry was not installed with the recommended installer. "
391│ "Cannot update automatically."
392│ )
393│
如果我还有什么要补充的,请告诉我post。
错误消息表明您可能已经使用 pip 安装了 poetry
,它不支持自动 poetry
更新。您应该卸载当前安装的 poetry
版本,然后使用使用自定义安装脚本的 the recommended method 重新安装。
在 osx/linux,您只需 运行 curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
下载和 运行 这个安装脚本。