Starting with Gemini 1.5 and Gemini 2.0, you should use Google Gen AI SDK, which provides a unified interface to Gemini 2.0 and 1.5 (and should be for Gemini 2.5 when GA) through both the Gemini Developer API and the Gemini API on Vertex AI. So, you just need: google-genai (version 1.7.0 as of now). You no longer need google-ai-generativelanguage.

I tested the latest google-genai with lanchain modules, seems installing fine.

Copylangchain==0.2.6
langchain-community==0.2.6
langchain-core==0.2.10
langchain-google-genai==1.0.7
langchain-text-splitters==0.2.2
langsmith==0.1.82
google-genai==1.7.0

Please review the Google Gen AI SDK documentation for detail.

Answer from Gang Chen on Stack Overflow
🌐
PyPI
pypi.org › project › langchain-google-genai
langchain-google-genai · PyPI
An integration package connecting Google's genai package and LangChain
      » pip install langchain-google-genai
    
🌐
GitHub
github.com › langchain-ai › langchain-google › issues › 914
ModuleNotFoundError: No module named 'langchain_google_genai' despite installation · Issue #914 · langchain-ai/langchain-google
May 9, 2025 - I am facing an issue while trying to import the module langchain_google_genai. Despite installing it using pip install langchain_google_genai, I am getting the following error: ModuleNotFoundError: No module named 'langchain_google_genai...
Author   langchain-ai
🌐
GitHub
github.com › langchain-ai › langchain-google › issues › 1041
langchain-google-genai dependency incompatibility with recent colab (google-generativeai 0.8.5 ) · Issue #1041 · langchain-ai/langchain-google
May 26, 2025 - The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS. The following code on google colab generates a dependency conflict whose error message is captured under the errors: ... ERROR: pip's dependency resolver does not currently take into account all the packages that are installed.
Author   langchain-ai
🌐
Docs by LangChain
docs.langchain.com › oss › python › integrations › chat › google_generative_ai
ChatGoogleGenerativeAI integration - Docs by LangChain
To access Google AI models you’ll need to create a Google Account, get a Google AI API key, and install the langchain-google-genai integration package.
🌐
GitHub
github.com › browser-use › browser-use › issues › 994
ModuleNotFoundError: No Module name 'langchain_google_genai' · Issue #994 · browser-use/browser-use
March 10, 2025 - Bug Description When I try to use Gemini as an LLM, I get a 'module not found' error. This started happening recently. If I install the missing package with uv pip install langchain_google_genai, it runs without any issues. Reproduction ...
Author   browser-use
🌐
Langchain
reference.langchain.com › python › integrations › langchain_google_genai
langchain_google_genai | LangChain Reference
As of langchain-google-genai 4.0.0, this package uses the consolidated google-genai SDK instead of the legacy google-ai-generativelanguage SDK. This migration brings support for Gemini models both via the Gemini Developer API and Gemini API in Vertex AI, superseding certain classes in langchain-google-vertexai, such as ChatVertexAI. Refer to the provider docs and release notes for more information.
Find elsewhere
🌐
GitHub
github.com › langchain-ai › langchain › issues › 16029
Unable to install langchain-google-genai · Issue #16029 · langchain-ai/langchain
January 15, 2024 - ERROR: Could not find a version that satisfies the requirement langchain-google-genai==0.0.5 (from versions: none) ERROR: No matching distribution found for langchain-google-genai==0.0.5
Author   langchain-ai
🌐
GitHub
github.com › langchain-ai › langchain › issues › 14753
ImportError: cannot import name 'GoogleGenerativeAI' from 'langchain_google_genai' ( from langchain_google_genai import GoogleGenerativeAI ) · Issue #14753 · langchain-ai/langchain
December 15, 2023 - ImportError: cannot import name 'GoogleGenerativeAI' from 'langchain_google_genai' ( from langchain_google_genai import GoogleGenerativeAI )#14753
Author   langchain-ai
🌐
GitHub
github.com › langchain-ai › langchain-google › issues › 980
`langchain-google-genai` uses older `google-ai-generativelanguage`, not the newer `google-genai` · Issue #980 · langchain-ai/langchain-google
June 13, 2025 - Hi, My setup is based on Python 3.13, with the following libraries google-genai==1.19.0 langchain==0.3.25 langchain-core==0.3.64 langchain-community==0.3.24 langchain-google-genai==2.1.5 langchain-...
Author   langchain-ai
🌐
GitHub
github.com › assafelovic › gpt-researcher › issues › 969
ImportError: Unable to import langchain-google-genai · Issue #969 · assafelovic/gpt-researcher
October 31, 2024 - gpt-researcher-1 | ⚠️ Error in reading JSON, attempting to repair JSON gpt-researcher-1 | Error using json_repair: the JSON object must be str, bytes or bytearray, not NoneType gpt-researcher-1 | ERROR: Exception in ASGI application gpt-researcher-1 | Traceback (most recent call last): gpt-researcher-1 | File "/usr/src/app/gpt_researcher/actions/agent_creator.py", line 27, in choose_agent gpt-researcher-1 | response = await create_chat_completion( gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gpt-researcher-1 | File "/usr/src/app/gpt_researcher/utils/llm.py", line 54, in create_chat_com
Author   assafelovic
🌐
npm
npmjs.com › package › @langchain › google-genai
langchain/google-genai
2 weeks ago - { "name": "your-project", "version": "0.0.0", "dependencies": { "@langchain/core": "^0.3.0", "@langchain/google-genai": "^0.0.0" }, "resolutions": { "@langchain/core": "^0.3.0" }, "overrides": { "@langchain/core": "^0.3.0" }, "pnpm": { "overrides": { "@langchain/core": "^0.3.0" } } }
      » npm install @langchain/google-genai
    
Published   Jun 17, 2026
Version   2.2.0
🌐
GitHub
github.com › langchain-ai › langchain › issues › 22676
unable to install langchain-google-genai in python 3.9.0 · Issue #22676 · langchain-ai/langchain
June 7, 2024 - i am trying to use the gemini api through the chatgooglegenerativeAI class in python 3.9.0 but i am not able to install langchain-google-genai which contains the aforementioned class. i looked up the issue in google and some older issuer's solution was that the module needs python version to be equal to 3.9 or greater.
Author   langchain-ai
🌐
LangChain
api.python.langchain.com › en › latest › google_genai › index.html
LangChain Reference Docs
Unified API reference documentation for LangChain, LangGraph, DeepAgents, LangSmith, and Integrations.