Import Error: streamlit Hello


Hey , I am trying to deploy my project in streamlit but I am facing error when I tried to run streamlit facing this issue can someone please help .

Steps to reproduce

Code snippet:

  File "/Users/apple/opt/anaconda3/bin/streamlit", line 8, in <module>
  File "/Users/apple/opt/anaconda3/lib/python3.8/site-packages/click/", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/apple/opt/anaconda3/lib/python3.8/site-packages/click/", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/apple/opt/anaconda3/lib/python3.8/site-packages/click/", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/apple/opt/anaconda3/lib/python3.8/site-packages/click/", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/apple/opt/anaconda3/lib/python3.8/site-packages/click/", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/apple/opt/anaconda3/lib/python3.8/site-packages/streamlit/web/", line 153, in main_hello
    from streamlit.hello import Hello
ImportError: cannot import name 'Hello' from 'streamlit.hello' (/Users/apple/opt/anaconda3/lib/python3.8/site-packages/streamlit/hello/
add code here
```ImportError: cannot import name 'Hello' from 'streamlit.hello' (/Users/apple/opt

Explain the undesired behavior or error you see when you run the code above.
If you're seeing an error message, share the full contents of the error message here.

### Debug info

- Streamlit version: (get it with `$ streamlit version`)
- Python version: (get it with `$ python --version`)
- Using Conda? PipEnv? PyEnv? Pex?
- OS version:
- Browser version:

### Requirements file

Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out [this doc]( and add a requirements file to your app.

### Links

* Link to your GitHub repo:
* Link to your deployed app:

### Additional information

If needed, add any other context about the problem here.

If you are trying to run streamlit hello make sure it is a lowercase h.

Hey thank you for your response, yes I tried It didn’t work .

Can you try creating a new environment and installing Streamlit with conda-forge?

-In anaconda, click on environments.
-Click Create at the bottom.
-Choose an environment name.
-After it’s created, click the green play button and choose terminal.
-In the environment’s terminal, conda install -c conda-forge streamlit
-Confirm yes when prompted.
-Then streamlit hello when it finishes.

hey thanks buddy, that worked but one question I have new_environment for streamlit but that also gave me same error so I deleted that environment what is the piece exactly I missed ? could you tell.!

Sometimes a package just doesn’t install correctly and needs to be uninstalled and reinstalled. It’s been implied that conda-forge may be a bit more reliable than pip to install Streamlit, but in the end if streamlit hello doesn’t work it’s a sign that it didn’t install properly. So either uninstall and reinstall, or start a new environment. It’s probably why the documentation so strongly recommends using an environment instead of base.

1 Like

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