DeepCode icon indicating copy to clipboard operation
DeepCode copied to clipboard

[Question]: ModuleNotFoundError: No module named 'mcp_agent.app' when running Streamlit app

Open nnrthota opened this issue 1 month ago • 1 comments

Do you need to ask a question?

  • [x] I have searched the existing question and discussions and this question is not already answered.
  • [ ] I believe this is a legitimate question, not just a bug or feature request.

Your Question

I cloned the DeepCode repository and tried running the Streamlit app, but I encounter an import error: ModuleNotFoundError: No module named 'mcp_agent.app'

╰─$ uv run streamlit run ui/streamlit_app.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501 Network URL: http://172.20.10.9:8501

2025-11-05 12:32:18.263 Uncaught app exception Traceback (most recent call last): File "/opt/homebrew/anaconda3/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling result = func() ^^^^^^ File "/opt/homebrew/anaconda3/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec exec(code, module.dict) File "/Volumes/REDLAB/tech-apps/AI/DeepCode/ui/streamlit_app.py", line 20, in from ui.layout import main_layout File "/Volumes/REDLAB/tech-apps/AI/DeepCode/ui/init.py", line 19, in from .layout import main_layout File "/Volumes/REDLAB/tech-apps/AI/DeepCode/ui/layout.py", line 17, in from .handlers import ( File "/Volumes/REDLAB/tech-apps/AI/DeepCode/ui/handlers.py", line 21, in from mcp_agent.app import MCPApp ModuleNotFoundError: No module named 'mcp_agent.app' 2025-11-05 12:32:18.334 Uncaught app exception Traceback (most recent call last): File "/opt/homebrew/anaconda3/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling result = func()

Additional Context

Steps to Reproduce

🔽 Clone the repository

git clone https://github.com/HKUDS/DeepCode.git cd DeepCode/

📦 Install UV package manager

curl -LsSf https://astral.sh/uv/install.sh | sh

🔧 Install dependencies with UV

uv venv --python=3.13 source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install -r requirements.txt

Using UV

uv run streamlit run ui/streamlit_app.py

nnrthota avatar Nov 05 '25 09:11 nnrthota

having same issue

jmorgan-wellovate avatar Nov 06 '25 02:11 jmorgan-wellovate

Hello, you can just run "uv run deepcode.py" , the readme will be updated! Thank you!

Zongwei9888 avatar Nov 09 '25 16:11 Zongwei9888