Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
Stay organized with collections
Save and categorize content based on your preferences.
This document describes how to resolve errors that you might encounter when
setting up an environment.
Errors when importing the Vertex AI SDK for Python
If you can't import the Vertex AI SDK for Python, it might be caused by one of the
following issues:
Outdated version of the Vertex AI SDK for Python
Issue:
You receive an error message similar to the following:
ImportError: cannot import name 'reasoning_engines' from 'vertexai.preview'
or
ImportError: cannot import name 'agent_angines' from 'vertexai'
Possible cause:
This might happen if the version of your google-cloud-aiplatform package
is earlier than 1.82.0 (for agent_engines) or 1.47.0
(for reasoning_engines). To check the version of your google-cloud-aiplatform
package, run the following command in the terminal:
pipshowgoogle-cloud-aiplatform
Recommended solution:
Run the following command in your terminal to update your
google-cloud-aiplatform package:
pipinstallgoogle-cloud-aiplatform--upgrade
Verify your updated version is 1.82.0 or later by running the following command:
pipshowgoogle-cloud-aiplatform
If you're in a notebook instance (For example, Jupyter or Colab or Workbench),
you might need to restart your runtime to use the updated packages.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Troubleshoot setting up an environment\n\nThis document describes how to resolve errors that you might encounter when\n[setting up an environment](/vertex-ai/generative-ai/docs/agent-engine/set-up).\n\nErrors when importing the Vertex AI SDK for Python\n--------------------------------------------------\n\nIf you can't import the Vertex AI SDK for Python, it might be caused by one of the\nfollowing issues:\n\n### Outdated version of the Vertex AI SDK for Python\n\n**Issue**:\n\nYou receive an error message similar to the following: \n\n ImportError: cannot import name 'reasoning_engines' from 'vertexai.preview'\n\nor \n\n ImportError: cannot import name 'agent_angines' from 'vertexai'\n\n**Possible cause**:\n\nThis might happen if the version of your `google-cloud-aiplatform` package\nis earlier than `1.82.0` (for `agent_engines`) or `1.47.0`\n(for `reasoning_engines`). To check the version of your `google-cloud-aiplatform`\npackage, run the following command in the terminal: \n\n pip show google-cloud-aiplatform\n\n**Recommended solution**:\n\nRun the following command in your terminal to update your\n`google-cloud-aiplatform` package: \n\n pip install google-cloud-aiplatform --upgrade\n\nVerify your updated version is `1.82.0` or later by running the following command: \n\n pip show google-cloud-aiplatform\n\nIf you're in a notebook instance (For example, Jupyter or Colab or Workbench),\nyou might need to restart your runtime to use the updated packages."]]