Specifying python version


I’m having troubles deploying this app: https://prophet.streamlit.app/ (repository: GitHub - artefactory/streamlit_prophet: Streamlit app to train, evaluate and optimize a Prophet forecasting model.).

I have the following error:
“Current Python version (3.7.15) is not allowed by the project (>=3.8 <3.11).
Please change python executable via the “env use” command.”

Where should I change the python version? I would like it to run in python 3.8 but it is currently stuck to 3.7.15.

I’m using poetry for dependency management, here is the pyproject.toml file:

Thanks in advance

Hey @MaximeLutel, have you checked out our docs?

Hi @Caroline,
Yes but the app is already created, so I don’t have the “advanced settings” section you mention, where I could choose the python version. Is it possible to change the python version after the app creation? I would like to keep the same app and not delete it, as it is in the gallery and it has a specific subdomain name.

You would have to delete the app and then re-deploy it to change the Python version unfortunately

I have the same problem (or will run into it soon) concerning re-deploying the app as @MaximeLutel. @Caroline, if I delete and re-deploy it, can it easily get the same specific subdomain as before?

@jgieseler Yes, that shouldn’t be a problem. Theoretically someone else could grab the subdomain before you are able to switch it to the new app, but the odds of that are pretty low.

  1. Delete the app
  2. Create a new app
  3. Set the subdomain of the new app to the old subdomain (you can even do this before step 2 finishes at share.streamlit.io)

As long as you don’t wait for a very long time between 1 and 3, you shouldn’t have any issues keeping the same subdomain.