[Python] Uvicorn can't find modules

Discussão em 'Python' iniciado por Stack, Setembro 13, 2025.

  1. Stack

    Stack Membro Participativo

    I have a folder that has my venv with dependencies and a python file.

    When I run the python file with python main.py it works.

    When I run the python file with uvicorn main:app --reload it throws a module not found error for all my dependencies. I want to turn the main.py into a fastapi app and installed fastapi and uvicorn to my venv and did app = FASTAPI()

    Why is it working when running python but uvicorn is not finding my dependencies?

    I uninstalled uvicorn and reinstalled it in my venv. I was expecting it to find my dependencies in my venv folder

    Continue reading...

Compartilhe esta Página