My project structure is: project_name sr...
# ask-community
s
My project structure is: project_name src/ --> logic code in here my_flow.py • Run in local with python my_flow.py -> ok • Regis to Prefect Cloud and run flow in prefect with my Local Agent with Failed. Failed to load and execute Flow's environment: StorageError('An error occurred while unpickling the flow:\n ModuleNotFoundError("No module named \'src\'")\nThis may be due to a missing Python module in your current environment. Please ensure you have all required flow dependencies installed.') update: I fixed by run agent local on project path (same directory of my_flow.py). But can i add enviroment path of each project to each flow for Agent local can run all flow ?
k
Hey @Son Mai, by default the dependencies are not included in the Flow storage. In this case, it should work though because you’re using LocalAgent and Local Storage. The issue here is that the script is running at a different place than you were expecting, which is why moving the location that the agent was run from worked. I think what you should do is package your Python project, then run
pip install -e .
, and this will add the project to the path