googleapis / googleapis/python-aiplatform

ModuleNotFoundError for vertexai.preview.agent_engine on clean install

Open
#5,833 0 comments 0 reactions 0 assignees View on GitHub
api: vertex-ai
Dominant language
Python
Stars
905
Forks
465
Avg merge
1d 13h
Merged PRs (30d)
44

Description

Title: ModuleNotFoundError for vertexai.preview.agent_engine on clean install
Bug Description
A clean installation of the latest google-cloud-aiplatform[preview] on a standard Python 3.11 environment fails to find the vertexai.preview.agent_engine module, resulting in a ModuleNotFoundError. This issue is reproducible on both macOS and clean Debian 12 VMs on Google Cloud.

Steps to Reproduce
Create a standard Debian 12 VM on Google Compute Engine.

SSH into the machine and run the following setup commands:

Bash

sudo apt-get update && sudo apt-get install -y python3-pip python3-venv
mkdir agent_test && cd agent_test
python3 -m venv .venv && source .venv/bin/activate
pip install --upgrade 'google-cloud-aiplatform[preview]'
Create a test file named test.py:

Python

from vertexai.preview.agent_engine import AgentEngineClient
print("Import successful!")
Run the script:

Bash

python test.py
Expected Behavior
The script should print "Import successful!"

Actual Behavior
The script fails with the following traceback:

Traceback (most recent call last):
File "/home/user/agent_test/test.py", line 1, in
from vertexai.preview.agent_engine import AgentEngineClient
ModuleNotFoundError: No module named 'vertexai.preview.agent_engine'
Environment Details
google-cloud-aiplatform version: (Run pip show google-cloud-aiplatform and add the version here)

Python Version: 3.11.9

Operating Systems Tested: macOS Sequoia (local), Debian 12 (on GCP)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.