无法找到streamlit==1.19.0版本,安装失败求助
解决Streamlit 1.19.0安装失败问题
问题说明
执行命令:
pip install streamlit==1.19.0
时出现以下错误:
ERROR: Could not find a version that satisfies the requirement streamlit==1.19.0 (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.8.2, 0.9.0, 0.11.0, 0.12.2, 0.12.3, 0.12.4, 0.13.0, 0.13.1, 0.13.3, 0.13.5, 0.14.2, 0.15.0, 0.15.1, 0.15.2, 0.15.3, 0.15.4, 0.15.5, 0.15.6, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.17.0, 0.17.1, 0.17.2, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 0.20.0, 0.21.0, 0.22.0, 0.22.1, 0.22.2, 0.23.0, 0.24.0, 0.24.1, 0.24.2, 0.24.3, 0.25.0, 0.26.0, 0.26.1, 0.27.0, 0.28.0, 0.29.0, 0.30.0, 0.31.0, 0.32.0, 0.33.0, 0.34.0, 0.35.0, 0.36.0, 0.37.0, 0.40.0, 0.40.1, 0.41.0, 0.42.0, 0.43.0, 0.43.1, 0.43.2, 0.44.0, 0.45.0, 0.46.0, 0.47.0, 0.47.1, 0.47.2, 0.47.3, 0.47.4, 0.48.0, 0.48.1, 0.49.0, 0.50.0, 0.50.1, 0.50.2, 0.51.0, 0.52.0, 0.52.1, 0.52.2, 0.53.0, 0.54.0, 0.55.0, 0.56.0, 0.57.0, 0.57.1, 0.57.2, 0.57.3, 0.58.0, 0.59.0, 0.60.0, 0.61.0, 0.62.0, 0.62.1, 0.63.0, 0.63.1, 0.64.0, 0.65.0, 0.65.1, 0.65.2, 0.66.0, 0.67.0, 0.67.1, 0.68.0, 0.68.1, 0.69.0, 0.69.1, 0.69.2, 0.70.0, 0.71.0, 0.72.0, 0.73.0, 0.73.1, 0.74.0, 0.74.1, 0.75.0, 0.76.0, 0.77.0, 0.78.0, 0.79.0, 0.80.0, 0.81.0, 0.81.1, 0.82.0, 0.83.0, 0.84.0, 0.84.1, 0.84.2, 0.85.0, 0.85.1, 0.86.0, 0.87.0, 0.88.0, 0.89.0, 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.5.1, 1.6.0rc3, 1.6.0rc4, 1.6.0, 1.7.0, 1.8.0rc1, 1.8.0, 1.8.1rc1, 1.8.1, 1.9.0rc1, 1.9.0, 1.9.1rc1, 1.9.1rc2, 1.9.1, 1.9.2rc1, 1.9.2, 1.10.0rc1, 1.10.0rc2, 1.10.0, 1.11.0rc1, 1.11.0, 1.11.1rc1, 1.11.1, 1.12.0rc1, 1.12.0rc2, 1.12.0) ERROR: No matching distribution found for streamlit==1.19.0
身处北美,尝试镜像源、更新pip至23.0.1、执行conda update conda均无效;Anaconda Navigator曾显示最新Streamlit版本为1.16.0(与pip错误提示的最高版本1.12.0矛盾),更新Navigator后问题未解决;更新操作后环境中Streamlit模块消失,但安装错误依旧。
解决方案
1. 检查Python版本兼容性
Streamlit 1.19.0仅支持Python 3.7~3.10版本,执行以下命令确认当前环境Python版本:
python --version
若版本不在范围内,需创建对应Python版本的conda环境后再尝试安装。
2. 确认pip归属当前conda环境
避免误使用系统pip或其他环境的pip,激活目标conda环境后执行:
which pip # Linux/macOS where pip # Windows
确认输出路径在当前conda环境目录下(例如~/anaconda3/envs/your_env/bin/pip)。若路径错误,执行conda install pip在当前环境重新安装pip。
3. 清理pip缓存后重新安装
旧缓存可能导致版本列表异常,执行:
pip cache purge pip install streamlit==1.19.0 --no-cache-dir
4. 尝试通过conda安装
若pip安装仍有问题,直接用conda-forge源安装指定版本:
conda install -c conda-forge streamlit=1.19.0
conda-forge源包含更全的Streamlit版本,且能自动处理依赖兼容性。
5. 重置conda环境索引
若Anaconda Navigator显示版本与pip不一致,重置conda包索引:
conda clean --all conda update --all
之后重新打开Anaconda Navigator查看环境中的Streamlit版本。
内容的提问来源于stack exchange,提问作者resssslll
相关产品推荐
相关产品推荐

