# Pip's dependency resolver does not currently take into account all the packages that are installed

**URL:** <https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460>\
**Category:** CrewAI Community Support\
**Created:** [September 18, 2024, 11:20am UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460 "2024-09-18T11:20:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![theg8](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/theg8/32/328_2.png) [@theg8](https://community.crewai.com/u/theg8)\
**Post date:** [September 18, 2024, 11:20am UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460/1 "2024-09-18T11:20:35Z")

</div>

Installing collected packages: langchain-core  
Attempting uninstall: langchain-core  
Found existing installation: langchain-core 0.3.0  
Uninstalling langchain-core-0.3.0:  
Successfully uninstalled langchain-core-0.3.0  
Successfully installed langchain-core-0.2.40  
Note: you may need to restart the kernel to use updated packages.  
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.  
langchain-google-genai 2.0.0 requires langchain-core\<0.4,\>=0.3.0, but you have langchain-core 0.2.40 which is incompatible.  
langchain-google-vertexai 2.0.0 requires langchain-core\<0.4,\>=0.3.0, but you have langchain-core 0.2.40 which is incompatible.

How do I fix this issue, (it occurs when I run pip install crewai after pip install langchain-google-genai)? I want to use crewai with langchain-google-genai to work with Gemini as the LLM. Is there another way to use Gemini as an LLM besides this method?

Thanks.

---

<div class="post-metadata">

**Author:** ![alexcovo](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@alexcovo](https://community.crewai.com/u/alexcovo)\
**Post date:** [September 18, 2024, 1:59pm UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460/2 "2024-09-18T13:59:23Z")

</div>

Hey @theg8

## I had the same problem since I use Gemini 1.5 flash as my llm manager. You don’t need to use langchain anymore. I also don’t use langchain-google-genai anymore as it doesn’t work either. I had to uninstall poetry, clear cache, reinstall poetry, reinitialize with poetry. I dont know if this was all needed but eventually helped me resolve the issue same issue you’re having. I also updated my pyproject.toml to include the following before running poetry install again: -------------------pyproject.toml--------------------- [tool.poetry.dependencies] python = “\>=3.10,\<=3.13” crewai = “^0.60.00” # Added this line filelock = “\*” # Added this line

Here’s my current set-up for the crewai.py file that works in 0.60.00 (with Gemini)

import os  
from crewai import Agent, Crew, Process, Task  
from crewai.project import CrewBase, agent, crew, task  
from langchain\_community.llms import OpenAI, Ollama  
from dotenv import load\_dotenv  
import litellm # Added for using google API for Gemini  
from crewai\_tools import SerperDevTool

search\_tool = SerperDevTool()

load\_dotenv()

# Set the Google API key for LiteLLM to use Gemini LLM Models

litellm.api\_key = os.getenv(‘GOOGLE\_API\_KEY’)

I set up a basic crew that uses local models and gemini llm manager if needed. It also accepts TOPIC user input instead of hard coding. Make’s it easier to use. Here’s the repo.

> **[GitHub - dax8it/Local-CrewAI: CrewAI Local Agents and LLM Manager](https://github.com/dax8it/Local-CrewAI)**
>
> CrewAI Local Agents and LLM Manager

Hope that helps!

---

<div class="post-metadata">

**Author:** ![matt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/matt/32/3_2.png) [@matt](https://community.crewai.com/u/matt)\
**Post date:** [September 18, 2024, 3:02pm UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460/3 "2024-09-18T15:02:38Z")

</div>

I would reinstall your crew to latest version in a fresh ENV as crewai no longer has langchain as a dependency

---

<div class="post-metadata">

**Author:** ![theg8](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/theg8/32/328_2.png) [@theg8](https://community.crewai.com/u/theg8)\
**Post date:** [September 18, 2024, 3:06pm UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460/4 "2024-09-18T15:06:30Z")

</div>

Thank you so much! I will try that and update you. 😄

---

<div class="post-metadata">

**Author:** ![theg8](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/theg8/32/328_2.png) [@theg8](https://community.crewai.com/u/theg8)\
**Post date:** [September 18, 2024, 3:09pm UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460/5 "2024-09-18T15:09:17Z")

</div>

Oh, I see. Thank you so much! Can I ask how I can use Gemini as the LLM in the CrewAI framework?

---

<div class="post-metadata">

**Author:** ![theg8](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/theg8/32/328_2.png) [@theg8](https://community.crewai.com/u/theg8)\
**Post date:** [September 18, 2024, 3:30pm UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460/6 "2024-09-18T15:30:42Z")

</div>

If it’s not too much trouble, I would like to ask a bit more, such as how to set the model name and model temperature for Gemini 1.5 Flash.

Thank you so much. I’m new to this. 😭

---

<div class="post-metadata">

**Author:** ![matt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/matt/32/3_2.png) [@matt](https://community.crewai.com/u/matt)\
**Post date:** [September 18, 2024, 3:46pm UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460/7 "2024-09-18T15:46:01Z")

</div>

> **[Connect CrewAI to LLMs - crewAI](https://docs.crewai.com/how-to/LLM-Connections/#connect-crewai-to-llms)**
>
> Comprehensive guide on integrating CrewAI with various Large Language Models (LLMs) using LiteLLM, including supported providers and configuration options.

See here for all models: [https://models.litellm.ai](https://models.litellm.ai)

For google flash ar you going through vertex or google dev?

Assign to your agent for vertex AI flash

```auto
llm='gemini-1.5-flash'

```

OR for google Dev

```auto
llm='gemini/gemini-1.5-flash'

```

---

<div class="post-metadata">

**Author:** ![theg8](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/theg8/32/328_2.png) [@theg8](https://community.crewai.com/u/theg8)\
**Post date:** [September 19, 2024, 3:43am UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460/8 "2024-09-19T03:43:21Z")

</div>

Thank you so much. 😁

---

<div class="post-metadata">

**Author:** ![theg8](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/theg8/32/328_2.png) [@theg8](https://community.crewai.com/u/theg8)\
**Post date:** [September 19, 2024, 8:18am UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460/9 "2024-09-19T08:18:40Z")

</div>

I got this error. How do I fix it?

Give Feedback / Get Help: `https://github.com/BerriAI/litellm/issues/new`  
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True`.

Here is the code I used:  
import os  
from dotenv import load\_dotenv  
load\_dotenv()  
os.environ[“GOOGLE\_APPLICATION\_CREDENTIALS”] = os.getenv(“GOOGLE\_APPLICATION\_CREDENTIALS”)  
os.environ[“temperature”] = “0.0”  
os.environ[“top\_p”] = “0.1”

llm=‘gemini-1.5-flash’ at agent

---

<div class="post-metadata">

**Author:** ![matt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/matt/32/3_2.png) [@matt](https://community.crewai.com/u/matt)\
**Post date:** [September 19, 2024, 8:33am UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460/10 "2024-09-19T08:33:32Z")

</div>

what issue? thats just a link to the LiteLLM issues page

---

<div class="post-metadata">

**Author:** ![theg8](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/theg8/32/328_2.png) [@theg8](https://community.crewai.com/u/theg8)\
**Post date:** [September 19, 2024, 10:49am UTC](https://community.crewai.com/t/pips-dependency-resolver-does-not-currently-take-into-account-all-the-packages-that-are-installed/460/11 "2024-09-19T10:49:41Z")

</div>

Sorry, my mistake. This thing always appears, and after that, the work results in an error like this:

BadRequestError: litellm.BadRequestError: VertexAIException BadRequestError - { “error”: { “code”: 400, “message”: “Request contains an invalid argument.”, “status”: “INVALID\_ARGUMENT” } }
