i try to run a python file using streamlit, it gives me an error saying saying streamlit is not a pacakge, i did installl streamlit

Viewed 401

it my first time using streamlit, i have installed sreamlit using pip install streamlit which it installed. itry running a python file using streamlit run pop.py it gives me this error below :

C:\Users\DELL>streamlit run pop.py
Traceback (most recent call last):
  File "c:\users\dell\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\dell\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python39\Scripts\streamlit.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'streamlit.cli'; 'streamlit' is not a package

i don't know what to do. please help

1 Answers

You are using it in Python. After opening the cmd, do not write python. Just go to the folder and write streamlit run pop.py in cmd. Not in Python.

Related