Streamlit errors in VScode (module not fount/no attributes)

Python version: 3.11.9

Streamlit was running find in VScode but now I can’t get it to run.

I am running python with a virtual environment and I have streamlit installed in the same environment (I have also tried re-installing/updated etc).

When I go to check the streamlit version (or do any streamlit command) I get the following:

(my_env) C:\Users\dld\OneDrive\python>streamlit --version
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Appl\my_env\Scripts\streamlit.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'streamlit.web'; 'streamlit' is not a package

I’ve been trawling through forums but haven’t found anything that works for me yet.

Any help appreciated!!!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.