In trying to run an app built with streamlit in Visual Studio Code with the “streamlit run Webby.py” command in the terminal, I get the following error message:
- FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\KamaKamaKama\OneDrive\VS Code Files> streamlit run Webby.py
streamlit : The term ‘streamlit’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
- streamlit run Webby.py
+ CategoryInfo : ObjectNotFound: (streamlit:String) , CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Is there a way around this error so that I can execute my app in Visual Studio Code?
In folder/workspace, VSC Files (standard env for VSC files),
- New File
- Save As “Webby.py”
- Select Recommended Interpreter: C:\Users\KamaKamaKama\AppData\Local\Programs\Python\Python312\python.exe
- In Terminal: pip install streamlit
- In editor window: import streamlit as st
- [CODE APP]
- In terminal: streamlit run Webby.py
- ERROR MESSAGE
Do I need to create a venv? At what stage do I do that from VSC? First thing before creating file? I tried that and noticed that terminal shell would not run python, only powershell. If so, how do I ensure streamlit is available for the terminal python shell to run the app when finished?
- Streamlit version: latest
- Python version:312
- Using Conda? PipEnv? PyEnv? Pex?
- OS version: Windows 11
- Browser version: Edge
I am brand new to this world. Apologies in advance for my lack of basic understanding. I just want to get over this hurdle/