首页 > 解决方案 > 如何选择我的 python 版本来使用 streamlit?

问题描述

我有一个 app.py,并且我的机器上安装了几个版本的 python。如何选择键入时应运行的 python 版本:

streamlit run app.py

标签: pythonstreamlit

解决方案


python --version 

输出: Python 3.8.8


这将是您的 streamlit 应用程序将在其上运行的版本。在我的情况下是 3.8.8。

如果你想为 streamlit 使用不同版本的 Python,你可以从 python.org 安装它,使用虚拟环境,或者使用 conda 创建一个特定的环境conda install python 3.6.0


推荐阅读