Hosting Streamlit App on Windows Server

Our Data Science team has started using streamlit for a few proof-of-concept and reporting type tools and absolutely loved the results! Thank you so much for the wonderful library, it’s a pleasure to use!

Issue
The only issue I haven’t been able to solve yet has been deployment on our Windows test servers. I’ve read through this related thread https://discuss.streamlit.io/t/config-in-windows-conda-environment/1295/11 which was very helpful. I modified the TCP settings but that didn’t fix my issue (unsurprisingly since my application runs fine and is accessible over the network from the command line) it’s just the task scheduler that fails to launch.

My Setup:
I’m using Anconda and installing streamlit in it’s own enviornment than calling streamlit run myapp.py after activating the environment. This works fine from the command line.

However, when I run the command from task scheduler on the Windows server a prompt opens immediately and then crashes. When I pipe the output to a log file I get the following:

image

Steps To reproduce:
Using Windows 2016 server

  • conda create -n streamlit-test python=3.7
  • pip install streamlit
  • streamlit hello (fine from command line and accessible over the network)
  • create task for task scheduler with extra arguments (screenshot below):

    • /c C:\ProgramData\Anaconda3\envs\streamlit-test\Scripts\streamlit.exe hello --server.port=8808 >> “D:\Logs\streamlit-test-log.txt” 2>&1

image

I’m also open to new workflows! If someone has had experience hosting applications on Windows servers that doesn’t involve the task scheduler that may be an easier fix. This is just the last hurdle we keep reaching when trying to persist applications for long term for company use. I appreciate any suggestions, thank you!

1 Like

Hi @rickarko, welcome to the Streamlit community!

Issues like this are always tough to debug, since we don’t have a Windows server to test against. Some really quick Googling of the urllib3.util.ssl_ error message suggests this might actually be a conda issue:

Maybe you could try switching the version of Python and seeing if the issue resolves?

Best,
Randy

1 Like

Hi Randy, thank you for the advice! I needed to add an additional folder to my Path C:\ProgramData\Anaconda3\Library\bin in addition to C:\ProgramData\Anaconda3\ doing this solved my issue!

1 Like