A problem with streamlit in VSC

Hello, iā€™m new in the comunity and have a big question about my app made in VSC using streamlit. An error dont allowed me to run my app, it says ā€œAttributeError: module ā€˜streamlitā€™ has no attribute ā€˜set_page_configā€™ā€ and says the same with all the attributes that iā€™m using. Can someone tell me what to do in these case, because iā€™ve done everything i know and more, i installed correctly streamlit in its latest version, upgraded it, etc. Please and thank you

Hi @mcolmenares,

Thanks for sharing this question!

If all the Streamlit elements are not recognized in your dev environment, it has to do with Streamlit installation or environment.

  1. Firstly, I would recommend checking the Streamlit version like so:
    streamlit --version
    
  2. Verify that youā€™ve imported Streamlit correctly at the top of your code file:
    import streamlit as st
    
  3. You can also use a Python virtual environment to isolate the packages of the app youā€™re working on:
    python -m venv venv
    source venv/bin/activate # on Windows, use `venv\Script\activate
    

After creating the venv, go ahead and install Streamlit in the virtual environment.

Also, feel free to share your code here.

1 Like