That’s all I do, and I don’t think I’ve changed anything in the environment, can you point out any specific things I should watch out for? What could be the reason? Thanks a lot!
Same issue. The project is working perfectly and after some dumb change, like adding memory to the crew (or honestly any other. I have experienced same error while changing empty lines in agents/task.yaml), the “crewai run” command gives this error about not finding the module named…
i also meet this problem, i create a project and run this project.
my problem
rewAI\my_project\.venv\Scripts\run_crew.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'my_project'
An error occurred while running the crew: Command '['uv', 'run', 'run_crew']' returned non-zero exit status 1.
base info:
crewai version: 0.105.0
i run follow this sequence:
crewai create crew my_project --skip_provider
cd my_project
crewai install
crewai run
Same issue for me too.
I don’t know enough about what crewai install and crewai run do behind the scenes.
But when we do the crewai install, it should build our projects and install that somewhere. In the .venv?
When we execute crewai run, it uses the TOML file to determine what crewai run should execute.
For my case, it is:
[project.scripts]
youtubesummerizer = “agents.main:run”
run_crew = “agents.main:run”
train = “agents.main:train”
replay = “agents.main:replay”
test = “agents.main:test”
When executing crewai run it fails with the error:
ModuleNotFoundError: No module named ‘agents’
An error occurred while running the crew: Command ‘[‘uv’, ‘run’, ‘run_crew’]’ returned non-zero exit status 1.
This is because based on the TOML it looks up the project.scripts and uses this line
run_crew = “agents.main:run”
agents.main is the namespace and run is the method in the main class it should execute.
For all of us, this first piece “agents” does not resolve correctly.
Anyone solve this?
Alternatively, I set up a .venv and execute my main.py class directly without using crewai to run it. I’d like to solve this so that I can test the training.