And*_*rii 10 python python-poetry
已安装poetry库,当我添加到pyproject.toml下一个设置时:
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "pep440"
Run Code Online (Sandbox Code Playgroud)
我收到错误:
Traceback (most recent call last):
File "/home/a-kostenko/.poetry/bin/poetry", line 17, in <module>
from poetry.console import main
File "/home/a-kostenko/.local/lib/python3.8/site-packages/poetry_dynamic_versioning/__init__.py", line 409, in alt_import
module = _state.original_import_func(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'poetry.console'
Run Code Online (Sandbox Code Playgroud)
请帮忙,出了什么问题?
Pra*_*rni 17
尝试做which\where诗歌。也许你有多个诗歌装置。请注意,现在有两个版本get-poetry.py,install-poetry.py
因此请确保卸载这两个版本,然后进行全新安装。
首先卸载所有内容。
curl -sSL https://install.python-poetry.org > install-poetry.py
python install-poetry.py --uninstall
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > get-poetry.py
python get-poetry.py --uninstall
Run Code Online (Sandbox Code Playgroud)
然后使用新install-poetry.py脚本再次安装
curl -sSL https://install.python-poetry.org > install-poetry.py
python install-poetry.py
Run Code Online (Sandbox Code Playgroud)
然后确保路径是否在环境中:
$HOME/.local/bin for Unix
%APPDATA%\Python\Scripts on Windows
Run Code Online (Sandbox Code Playgroud)
最后测试
poetry --version
Run Code Online (Sandbox Code Playgroud)
这是PowerShell的方式。
$ul = ("https://install.python-poetry.org",
"https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py",
"https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py")
$ul |% { (Invoke-WebRequest -Uri $_ -UseBasicParsing).Content | py - --uninstall }
Run Code Online (Sandbox Code Playgroud)
$ul |% { (Invoke-WebRequest -Uri $_ -UseBasicParsing).Content | py -}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
21643 次 |
| 最近记录: |