Error accessing modules in venv

Hi there,

I am using a brand new version of crewai and I am trying to add a text_2_speech tool. I am using an elevenlabs webhook and I am mostly having problems with the audio library.
The second virtual environment is not finding the python “pydub” library in the tool. I can see it is in the same venv where crewai is installed, not in the one of the agents. WHen I try to install in the one exclusive of the agents, It says that the requirement is satisfied, but the crew is not able to find the module when it is running.

I am unsure from where does the crew is accessing the modules.
How can I better differentiate among these two virtual environments?

Many thanks

I have a top .venv where my crewai is installed, and where almost everything is installed.
When I run crewai install I get a second .venv for the agents and I get a warning “warning: VIRTUAL_ENV=/home/ru/Documents/AgenlyAI/.venv does not match the project environment path .venv and will be ignored”

after installing using pip in both the .venv the crew is not able to find the modules I just installed.

Can someone please help.

my full error is:

Running the Crew
warning: VIRTUAL_ENV=/home/ru/Documents/AgenlyAI/.venv does not match the project environment path .venv and will be ignored
/usr/lib/python3/dist-packages/paramiko/pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
“cipher”: algorithms.TripleDES,
/usr/lib/python3/dist-packages/paramiko/transport.py:237: CryptographyDeprecationWarning: Blowfish has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.Blowfish and will be removed from this module in 45.0.0.
“class”: algorithms.Blowfish,
/usr/lib/python3/dist-packages/paramiko/transport.py:261: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
“class”: algorithms.TripleDES,
Traceback (most recent call last):
File “/home/ru/Documents/AgenlyAI/agenlyagents/.venv/bin/run_crew”, line 5, in
from agenlyagents.main import run
File “/home/ru/Documents/AgenlyAI/agenlyagents/src/agenlyagents/main.py”, line 5, in
from agenlyagents.crew import Agenlyagents
File “/home/ru/Documents/AgenlyAI/agenlyagents/src/agenlyagents/crew.py”, line 5, in
from composio import App
ModuleNotFoundError: No module named ‘composio’
An error occurred while running the crew: Command ‘[‘uv’, ‘run’, ‘run_crew’]’ returned non-zero exit status 1.

Many thanks to all

How are you adding Composio to the project? Can you please share the code?

In several ways,
Install them using pip,

I call them using

from crewai import Agent, Crew, Process, Task

from crewai.project import CrewBase, agent, crew, task

from crewai_tools import SerperDevTool, ComposioTool

from langchain_openai import ChatOpenAI

from composio import App

composio_toolset = ComposioTool()

tools_audio = composio_toolset.from_app(App.ELEVENLABS, use_case=“ELEVENLABS_TEXT_TO_SPEECH”)

I then add it to the agent.

i get right away my error message:

Running the Crew
warning: VIRTUAL_ENV=/home/ru/Documents/AgenlyAI/.venv does not match the project environment path .venv and will be ignored
/usr/lib/python3/dist-packages/paramiko/pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
“cipher”: algorithms.TripleDES,
/usr/lib/python3/dist-packages/paramiko/transport.py:237: CryptographyDeprecationWarning: Blowfish has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.Blowfish and will be removed from this module in 45.0.0.
“class”: algorithms.Blowfish,
/usr/lib/python3/dist-packages/paramiko/transport.py:261: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
“class”: algorithms.TripleDES,
Traceback (most recent call last):
File “/home/ru/Documents/AgenlyAI/agenlyagents/.venv/bin/run_crew”, line 5, in
from agenlyagents.main import run
File “/home/ru/Documents/AgenlyAI/agenlyagents/src/agenlyagents/main.py”, line 5, in
from agenlyagents.crew import Agenlyagents
File “/home/ru/Documents/AgenlyAI/agenlyagents/src/agenlyagents/crew.py”, line 5, in
from composio import App
ModuleNotFoundError: No module named ‘composio’
An error occurred while running the crew: Command ‘[‘uv’, ‘run’, ‘run_crew’]’ returned non-zero exit status 1.

Try to install the Composio SDK with the following command:

uv add composio-core

You have to execute the command inside the directory where the uv.lock file is located.