From the project root directory:
python run_streamlit.pyThis automatically handles all path setup.
From the project root directory:
streamlit run src/apps/streamlit_demo/app.pyImportant: You must be in the project root (I:\CursorProjects\Research\Mathematics\ARKHE), not in the src/apps/streamlit_demo/ folder.
This error occurs when Python can't find the math_research module. This happens if:
- You're running from the wrong directory
- The path setup in the app fails
- Streamlit changes the working directory
Solution 1: Use the launcher script (Recommended)
python run_streamlit.pySolution 2: Verify your current directory
# Windows (PowerShell)
Get-Location
# Should show: I:\CursorProjects\Research\Mathematics\ARKHE
# If not, navigate there:
cd I:\CursorProjects\Research\Mathematics\ARKHESolution 3: Test imports first
python test_streamlit_import.pyIf this works, then Streamlit should work too.
Solution 4: Set PYTHONPATH explicitly
# Windows PowerShell
$env:PYTHONPATH="I:\CursorProjects\Research\Mathematics\ARKHE\src"
streamlit run src/apps/streamlit_demo/app.py
# Windows Command Prompt
set PYTHONPATH=I:\CursorProjects\Research\Mathematics\ARKHE\src
streamlit run src/apps/streamlit_demo/app.pyThe app.py file has been updated with:
- Better path resolution using absolute paths
- Fallback path searching
- Helpful error messages if imports fail
- Test imports: Run
python test_streamlit_import.py - Check directory: Make sure you're in the project root
- Verify structure: Ensure
src/math_research/exists - Check Streamlit: Verify Streamlit is installed:
streamlit --version
Once Streamlit starts successfully:
- Browser will open automatically
- URL:
http://localhost:8501 - If browser doesn't open, copy the URL from the terminal
Press Ctrl+C in the terminal where Streamlit is running.