browser-use icon indicating copy to clipboard operation
browser-use copied to clipboard

No module named 'mem0'

Open filwu8 opened this issue 9 months ago • 3 comments

Bug Description

PS D:\Dev\browser-use> python run.py INFO [browser_use] BrowserUse logging setup complete with level info Traceback (most recent call last): File "D:\Dev\browser-use\run.py", line 2, in from browser_use import Agent File "D:\Dev\browser-use\browser_use_init_.py", line 6, in from browser_use.agent.service import Agent as Agent File "D:\Dev\browser-use\browser_use\agent\service.py", line 26, in from browser_use.agent.memory.service import Memory, MemorySettings File "D:\Dev\browser-use\browser_use\agent\memory_init_.py", line 1, in from browser_use.agent.memory.service import Memory, MemorySettings File "D:\Dev\browser-use\browser_use\agent\memory\service.py", line 12, in from mem0 import Memory as Mem0Memory ModuleNotFoundError: No module named 'mem0' PS D:\Dev\browser-use> pip install mem0 ERROR: Could not find a version that satisfies the requirement mem0 (from versions: none)

Reproduction Steps

I used Quick start,but ? Image

Code Sample

from langchain_openai import ChatOpenAI
from browser_use import Agent
import asyncio
from dotenv import load_dotenv
load_dotenv()

async def main():
    agent = Agent(
        task="Compare the price of gpt-4o and DeepSeek-V3",
        llm=ChatOpenAI(model="DeepSeek-V3"),
    )
    await agent.run()

asyncio.run(main())

Version

pip 24.3.1

LLM Model

DeepSeek Coder

Operating System

win11

Relevant Log Output


filwu8 avatar Apr 01 '25 01:04 filwu8

pip install mem0ai

007gzs avatar Apr 01 '25 02:04 007gzs

just git pull; uv sync or pip install --upgrade git+https://github.com/browser-use/browser-use.git@main no need to install subdependency packages like mem0ai manually.

pirate avatar Apr 01 '25 02:04 pirate

just git pull; uv sync or pip install --upgrade git+https://github.com/browser-use/browser-use.git@main no need to install subdependency packages like mem0ai manually.

thanks !

filwu8 avatar Apr 01 '25 14:04 filwu8

This dependency issue has been completely resolved! The mem0 dependency was part of an experimental memory feature that has since been removed from browser-use.

For anyone still seeing this error:

  1. Update to the latest browser-use version
  2. Clear your Python cache: pip cache purge
  3. Reinstall: pip install --upgrade --force-reinstall browser-use

Thanks for reporting this!

Cfomodz avatar Aug 29 '25 02:08 Cfomodz