Soluciona problemas relacionados con la configuración de un entorno
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En este documento, se describe cómo resolver errores que puedes encontrar cuando configuras un entorno.
Errores al importar el SDK de Vertex AI para Python
Si no puedes importar el SDK de Vertex AI para Python, es posible que se deba a uno de los siguientes problemas:
Versión desactualizada del SDK de Vertex AI para Python
Problema:
Recibes un mensaje de error similar al siguiente:
ImportError: cannot import name 'reasoning_engines' from 'vertexai.preview'
Causa posible:
Esto puede suceder si la versión de tu paquete google-cloud-aiplatform es anterior a 1.47.0. Para verificar la versión de tu paquete google-cloud-aiplatform, ejecuta el siguiente comando en la terminal:
pipshowgoogle-cloud-aiplatform
Solución recomendada:
Ejecuta el siguiente comando en la terminal para actualizar tu
paquete google-cloud-aiplatform:
pipinstallgoogle-cloud-aiplatform--upgrade
Ejecuta el siguiente comando para verificar que la versión actualizada sea 1.47.0 o posterior:
pipshowgoogle-cloud-aiplatform
Si estás en una instancia de notebook (por ejemplo, Jupyter, Colab o Workbench), es posible que debas reiniciar tu entorno de ejecución para usar los paquetes actualizados.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (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."]]