Skip to content

op: fix: ModuleNotFoundErrors during deployment and sample data loading (Telco churn data)#72

Open
fmoorhof wants to merge 2 commits intobusiness-science:masterfrom
fmoorhof:feature/deployment-ipython
Open

op: fix: ModuleNotFoundErrors during deployment and sample data loading (Telco churn data)#72
fmoorhof wants to merge 2 commits intobusiness-science:masterfrom
fmoorhof:feature/deployment-ipython

Conversation

@fmoorhof
Copy link

Thanks for your exciting developments!
During deployment i had a small issue with a missing dependency and would hereby suggest a small and straightforward fix:

ModuleNotFoundError: No module named 'IPython'
The error was displayed in the Terminal as well as in the app in the browser which made its usage impossible
Traceback:

File "~/ai-data-science-team/apps/ai-pipeline-studio-app/app.py", line 33, in <module>
    from ai_data_science_team.agents.data_loader_tools_agent import DataLoaderToolsAgent
File "~/ai-data-science-team/ai_data_science_team/__init__.py", line 1, in <module>
    from ai_data_science_team.agents import (
File "~/ai-data-science-team/ai_data_science_team/agents/__init__.py", line 1, in <module>
    from ai_data_science_team.agents.data_cleaning_agent import make_data_cleaning_agent, DataCleaningAgent
File "~/ai-data-science-team/ai_data_science_team/agents/data_cleaning_agent.py", line 22, in <module>
    from IPython.display import Markdown

Solution

pip install ipython
(or adding it to requirements.txt directly)
my ipython version was 8.38.0, not sure if you want to pin it (>=8.38.0)...
The app now starts smoothly and also there are no further errors in the terminal

Installation and usage steps

pip install -e .
streamlit run apps/ai-pipeline-studio-app/app.py

My system

conda create -n ds-team python==3.10 -y
conda activate ds-team
python --version # Python 3.10.0
cat /etc/os-release

NAME="openSUSE Leap"
VERSION="15.6"
ID="opensuse-leap"

@fmoorhof fmoorhof changed the title op: fix: ModuleNotFoundError: No module named 'IPython' op: fix: ModuleNotFoundErrors during deployment and sample data loading (Telco churn data) Jan 26, 2026
@fmoorhof
Copy link
Author

Additionally to the deployment also the 'Load sample Telco chrin data' seems to require two additional dependencies (h2o and mlflow) not listed in the requirements.txt

please see commit #6b65a97 for a suggested fix.

these are the resulting error Tracebacks:

ImportError: The 'h2o' library is not installed. Please install it using pip: pip install h2o Visit https://docs.h2o.ai/h2o/latest-stable/h2o-docs/downloading.html for details.
Traceback:

File "~/ai-data-science-team/apps/ai-pipeline-studio-app/app.py", line 5951, in <module>
    team = build_team(
File "~/ai-data-science-team/apps/ai-pipeline-studio-app/app.py", line 4967, in build_team
    h2o_ml_agent = H2OMLAgent(
File "~/ai-data-science-team/ai_data_science_team/ml_agents/h2o_ml_agent.py", line 218, in __init__
    self._compiled_graph = self._make_compiled_graph()
File "~/ai-data-science-team/ai_data_science_team/ml_agents/h2o_ml_agent.py", line 226, in _make_compiled_graph
    return make_h2o_ml_agent(**self._params)
File "~/ai-data-science-team/ai_data_science_team/ml_agents/h2o_ml_agent.py", line 473, in make_h2o_ml_agent
    raise ImportError(
ImportError: MLflow is not installed. Please install it by running: pip install mlflow
Traceback:
File "~/ai-data-science-team/apps/ai-pipeline-studio-app/app.py", line 5951, in <module>
    team = build_team(
File "~/ai-data-science-team/apps/ai-pipeline-studio-app/app.py", line 4976, in build_team
    mlflow_tools_agent = MLflowToolsAgent(
File "~/ai-data-science-team/ai_data_science_team/ml_agents/mlflow_tools_agent.py", line 163, in __init__
    self._compiled_graph = self._make_compiled_graph()
File "~/ai-data-science-team/ai_data_science_team/ml_agents/mlflow_tools_agent.py", line 171, in _make_compiled_graph
    return make_mlflow_tools_agent(**self._params)
File "~/ai-data-science-team/ai_data_science_team/ml_agents/mlflow_tools_agent.py", line 385, in make_mlflow_tools_agent
    raise ImportError(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant