Poetry 1.2.2版本update及自更新卡顿,求可行解决办法
Poetry 1.2.2卡在依赖解析/自更新环节的解决办法
针对你遇到的Poetry 1.2.2卡在Resolving dependencies...以及自更新时下载msgpack包停滞的问题,可尝试以下几种解决方式:
切换PyPI镜像源
官方源访问缓慢或不稳定是常见原因,替换为国内镜像能加速下载:poetry config repositories.pypi https://pypi.tuna.tsinghua.edu.cn/simple配置完成后重新执行
poetry self update或poetry update。手动安装卡住的依赖包
绕过自动下载环节,手动处理msgpack-1.0.4.tar.gz:- 从PyPI下载该包的源码压缩包
- 执行本地安装命令:
poetry self add /本地路径/msgpack-1.0.4.tar.gz
完成后再尝试执行
poetry self update。清理Poetry缓存
缓存文件损坏可能导致进程停滞,清理后重新运行:- Linux/macOS:删除
~/.cache/pypoetry目录下的缓存内容 - Windows:删除
%APPDATA%\pypoetry\Cache目录下的缓存内容
清理完成后重新执行相关命令。
- Linux/macOS:删除
手动指定版本升级Poetry
直接通过官方安装脚本指定目标版本,绕过自更新的卡顿:- Linux/macOS:
curl -sSL https://install.python-poetry.org | python3 - --version 1.8.3 - Windows(PowerShell):
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python - --version 1.8.3
可根据需求替换
1.8.3为其他稳定版本。- Linux/macOS:
内容的提问来源于stack exchange,提问作者HAL9000
相关产品推荐
相关产品推荐

