lavague-ai / LaVague

Large Action Model framework to develop AI Web Agents
https://docs.lavague.ai/en/latest/
Apache License 2.0
5.31k stars 479 forks source link

ModuleNotFoundError: No module named 'lavague.drivers' #605

Open alxcnwy opened 3 days ago

alxcnwy commented 3 days ago

Describe the bug I'm getting the following error after pip install lavague and trying to run the test code:

python test.py
/Users/alexc/Documents/_projects/playback/lavague_test/venv/lib/python3.9/site-packages/lavague/__init__.py:10: UserWarning: Telemetry is turned on. To turn off telemetry, set your TELEMETRY_VAR to 'NONE'
  warnings.warn(warning_message, UserWarning)
/Users/alexc/Documents/_projects/playback/lavague_test/venv/lib/python3.9/site-packages/lavague/__init__.py:16: UserWarning: Security warning: This package executes LLM-generated code. Consider using this package in a sandboxed environment.
  warnings.warn(warning_message, UserWarning)
Traceback (most recent call last):
  File "/Users/alexc/Documents/_projects/playback/lavague_test/test.py", line 2, in <module>
    from lavague.drivers.selenium import SeleniumDriver
ModuleNotFoundError: No module named 'lavague.drivers'

To Reproduce Steps to reproduce the behavior:

  1. pip install lavague on M2 mac
  2. Run the test code from the repo

Expected behavior I expect the test code to run

oranciog-bd commented 3 days ago

Hy! I think the problem is python3.9 . Try to use a newer version of python: (I work with python 3.10 on Mac M2 and the following is working ):

python3.10 -m venv venv
source ./venv/bin/activate
pip install lavague
python3 -V (#3.10.14)
python3 test.py 

Where test.py is :

from lavague.core import  WorldModel, ActionEngine
from lavague.core.agents import WebAgent
from lavague.drivers.selenium import SeleniumDriver

selenium_driver = SeleniumDriver(headless=False)
world_model = WorldModel()
action_engine = ActionEngine(selenium_driver)
agent = WebAgent(world_model, action_engine)
agent.get("https://huggingface.co/docs")
agent.run("Extract the first paragraph only from the quicktour PEFT subsection")