Streamlit应用部署失败:无法找到ipython==8.21.0版本求助
解决Streamlit部署时ipython依赖安装失败问题
问题核心
部署Streamlit应用时触发两个关键错误:
- 不存在
ipython==8.21.0这个正式版本(报错列出的可用版本最高到8.18.1) - pip版本过旧(22.0.3),可能限制了包索引的查询能力,最终导致部署流程中断
解决步骤
修正ipython版本约束
- 打开项目的
requirements.txt(或其他依赖管理文件),将ipython==8.21.0替换为已发布的稳定版本,例如:
或者采用宽松的版本约束,兼顾兼容性:ipython==8.18.1ipython>=8.10.0,<9.0.0 - 若该依赖是其他包间接引入的,可在本地执行
pip check排查依赖冲突,或调整相关包的版本以消除对不存在的ipython版本的依赖
- 打开项目的
升级pip版本
在部署环境中执行以下命令升级pip,确保能正确查询最新包索引:/home/adminuser/venv/bin/python -m pip install --upgrade pip(本地开发环境直接执行
python -m pip install --upgrade pip即可)重新触发部署
修改完依赖文件后,推送更新到git仓库,重启Streamlit应用的部署流程即可
原报错信息
ERROR: Could not find a version that satisfies the requirement ipython==8.21.0 (from versions: 0.10, 0.10.1, 0.10.2, 0.11, 0.12, 0.12.1, 0.13, 0.13.1, 0.13.2, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 4.0.0b1, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.1.0rc1, 4.1.0rc2, 4.1.0, 4.1.1, 4.1.2, 4.2.0, 4.2.1, 5.0.0b1, 5.0.0b2, 5.0.0b3, 5.0.0b4, 5.0.0rc1, 5.0.0, 5.1.0, 5.2.0, 5.2.1, 5.2.2, 5.3.0, 5.4.0, 5.4.1, 5.5.0, 5.6.0, 5.7.0, 5.8.0, 5.9.0, 5.10.0, 6.0.0rc1, 6.0.0, 6.1.0, 6.2.0, 6.2.1, 6.3.0, 6.3.1, 6.4.0, 6.5.0, 7.0.0b1, 7.0.0rc1, 7.0.0, 7.0.1, 7.1.0, 7.1.1, 7.2.0, 7.3.0, 7.4.0, 7.5.0, 7.6.0, 7.6.1, 7.7.0, 7.8.0, 7.9.0, 7.10.0, 7.10.1, 7.10.2, 7.11.0, 7.11.1, 7.12.0, 7.13.0, 7.14.0, 7.15.0, 7.16.0, 7.16.1, 7.16.2, 7.16.3, 7.17.0, 7.18.0, 7.18.1, 7.19.0, 7.20.0, 7.21.0, 7.22.0, 7.23.0, 7.23.1, 7.24.0, 7.24.1, 7.25.0, 7.26.0, 7.27.0, 7.28.0, 7.29.0, 7.30.0, 7.30.1, 7.31.0, 7.31.1, 7.32.0, 7.33.0, 7.34.0, 8.0.0a1, 8.0.0b1, 8.0.0rc1, 8.0.0, 8.0.1, 8.1.0, 8.1.1, 8.2.0, 8.3.0, 8.4.0, 8.5.0, 8.6.0, 8.7.0, 8.8.0, 8.9.0, 8.10.0, 8.11.0, 8.12.0, 8.12.1, 8.12.2, 8.12.3, 8.13.0, 8.13.1, 8.13.2, 8.14.0, 8.15.0, 8.16.0, 8.16.1, 8.17.0, 8.17.1, 8.17.2, 8.18.0, 8.18.1) ERROR: No matching distribution found for ipython==8.21.0 WARNING: You are using pip version 22.0.3; however, version 24.0 is available. You should consider upgrading via the '/home/adminuser/venv/bin/python -m pip install --upgrade pip' command. Checking if Streamlit is installed ──────────────────────────────────────────────────────────────────────────────────────── [15:52:48] ❗️ installer returned a non-zero exit code [15:52:48] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app. [15:54:21] ❗️ Streamlit server consistently failed status checks [15:54:21] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.
内容的提问来源于stack exchange,提问作者navvaish
相关产品推荐
相关产品推荐

