Running my app on windows

Hi, usually I run my streamit app on my Mac OS using Jupiter when I am testing things out but I now want to implement a streamline app at work.

In Jupyter, this is the cell I run to view my app in the browser:

!jupyter nbconvert   --to script Streamlit_test.ipynb
!awk '!/ipython/' Streamlit_test.py >  temp.py && mv temp.py app.py && rm Streamlit_test.py
!streamlit run app.py

However this does not work in windows! How would one usually preview their streamlit app in windows?

Thanks

Hi @jimchoo91 -

I’m guessing that Windows shell doesn’t use the same exact commands as a Linux-y shell. Guessing even further, I suspect it’s awk that isn’t installed by default, but certainly it could be mv or rm (I’m not a user of Windows shell).

In general, you could avoid this problem by not using a notebook to auto-generate your Python code and just using a text editor such as VSCode directly. Or from the notebook, exporting a .py file using the File menu.

Best,
Randy