# ImportError: cannot import name 'BaseTool' from 'crewai.tools' when deploying to Cloud Run

**URL:** <https://community.crewai.com/t/importerror-cannot-import-name-basetool-from-crewai-tools-when-deploying-to-cloud-run/7135>\
**Category:** CrewAI Community Support\
**Tags:** tools\_issues\
**Created:** [October 20, 2025, 6:59pm UTC](https://community.crewai.com/t/importerror-cannot-import-name-basetool-from-crewai-tools-when-deploying-to-cloud-run/7135 "2025-10-20T18:59:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MCN](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@MCN](https://community.crewai.com/u/MCN)\
**Post date:** [October 20, 2025, 6:59pm UTC](https://community.crewai.com/t/importerror-cannot-import-name-basetool-from-crewai-tools-when-deploying-to-cloud-run/7135/1 "2025-10-20T18:59:45Z")

</div>

**Environment** : macOS → Google Cloud Run (Python 3.11-slim Docker)

**Issue** : ImportError: cannot import name ‘BaseTool’ from ‘crewai.tools’ when deploying to Cloud Run

- ✅ Works perfectly locally

- ❌ Fails in containerized deployment

**Error Location** : crewai\_tools/adapters/enterprise\_adapter.py:7

**Current Versions** :

- crewai==0.175.0 (upgraded based on release notes: “fixed import issues”)

- crewai-tools==0.76.0 (latest available)

**Dockerfile Strategy** :

# Install local crewai source first

RUN pip install -e .

# Then install PyPI packages

RUN pip install -r requirements.txt

**Question** : Is the version mismatch between crewai (0.175.0) and

crewai-tools (0.76.0) causing this import conflict? What’s the recommended

approach for Cloud Run deployments? Please help

–

Request for Guidance

1. **Is there a recommended approach for deploying CrewAI applications to containerized**

**environments like Google Cloud Run?**

2. **Should we expect crewai-tools to be compatible with local CrewAI source**

**installations?**

3. **Are there plans to align crewai-tools dependency versions with current CrewAI**

**releases?**

4. **Is there a workaround for the BaseTool export discrepancy between local source and**

**PyPI packages?**

---

<div class="post-metadata">

**Author:** ![carmelo\_iaria](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/carmelo_iaria/32/4432_2.png) [@carmelo\_iaria](https://community.crewai.com/u/carmelo_iaria)\
**Post date:** [October 24, 2025, 10:24pm UTC](https://community.crewai.com/t/importerror-cannot-import-name-basetool-from-crewai-tools-when-deploying-to-cloud-run/7135/2 "2025-10-24T22:24:51Z")

</div>

Hi @MCN, your local environment tolerates the mixed installation, but the containerized Cloud Run environment enforces stricter import resolution.

Standardizing on PyPI packages solves this consistently.

## 1. Recommended approach for Cloud Run deployments?

**Use PyPI packages only** - avoid mixing local source installations (`pip install -e .`) with PyPI packages. The `pip install 'crewai[tools]'` syntax is the official recommendation for production deployments.

## 2. Should crewai-tools be compatible with local source installations?

**No, this is not officially supported.** The `crewai-tools` package expects `BaseTool` to be available from the installed `crewai` package’s public API. Local editable installs can cause import resolution conflicts in containerized environments.

## 3. Are there plans to align versions?

Based on the release notes (v0.175.0), the team is aware of import issues and has been fixing them. However, the **version numbering mismatch** (crewai 0.175.0 vs crewai-tools 0.76.0) suggests these are **separate release cycles**. Use `crewai[tools]` to ensure compatibility.

## 4. Workaround for BaseTool export discrepancy?

**The fix:** Ensure `BaseTool` is imported from `crewai.tools`:

python

```auto
from crewai.tools import BaseTool

```

If `crewai_tools` is trying to import it, make sure you’re using compatible versions installed from PyPI together.

Also, make sure you test Docker image locally before Cloud Run deployment

```auto
docker build -t crewai-test .

# Run
docker run --rm crewai-test

# If you need to inspect
docker run -it --rm crewai-test /bin/bash

```

let me know if this helps!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex025/uploads/crewai/original/1X/ecda97e72f77c7100e0a761444b1c991925cc789.png) [@system](https://community.crewai.com/u/system)\
**Post date:** [November 2, 2025, 7:52pm UTC](https://community.crewai.com/t/importerror-cannot-import-name-basetool-from-crewai-tools-when-deploying-to-cloud-run/7135/3 "2025-11-02T19:52:25Z")

</div>

Closed on November 2, 2025, 7:52pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
