ModuleNotFoundError: No module named 'seaborn' - with conda yml file

I just deployed my first app on Streamlit Cloud. I read the other topic on modulenotfounderror for seaborn but I don’t think the suggestion there applies in my case.

I used an environment file (environment.yml) which contains the following lines:

name: streamlit_test
channels:
  - defaults
dependencies:
  - python=3.8
  - seaborn

And I see the following message on the side (manage app) panel when I deployed the app:

[manager] Python dependencies were installed from /app/di_streamlit/practice_area/environment.yml using conda.
[manager] Processed dependencies!

But I get the following message:

Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/script_runner.py", line 379, in _run_script
    exec(code, module.__dict__)
  File "/app/di_streamlit/practice_area/practice_area2.py", line 12, in <module>
    import seaborn as sns
ModuleNotFoundError: No module named 'seaborn'

What do I need to do to fix this error?

1 Like

Hi @Naoko and welcome! Could you share a link to a repository that we can use to investigate this issue? We have been working on updating some of our infrastructure to use the latest version of components and this might have interfered with how the Python packages are downloaded.

I have the same issue importing seaborn. plz fix it :slight_smile: