# ModuleNotFoundError: No module named 'distutils'

**URL:** https://community.taiga.io/t/modulenotfounderror-no-module-named-distutils/6844
**Category:** Self hosted Taiga
**Tags:** docker, issues
**Created:** [March 27, 2025, 5:33am UTC](https://community.taiga.io/t/modulenotfounderror-no-module-named-distutils/6844 "2025-03-27T05:33:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![zarir-engineer](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/zarir-engineer/32/4240_2.png) [@zarir-engineer](https://community.taiga.io/u/zarir-engineer)
#### Post date: [March 27, 2025, 5:33am UTC](https://community.taiga.io/t/modulenotfounderror-no-module-named-distutils/6844/1 "2025-03-27T05:33:11Z")

</div>

I have forked taiga-back and using its stable branch.

repo : [GitHub - zarir-engineer/taiga-back](https://github.com/zarir-engineer/taiga-back.git)

In the dockerfile the first line is

```auto
FROM python:3.11-slim

```

> in contrast the control is going thru python 3.12 as the error shows. Please suggest a work around for this. Or what am i missing here. ?
> 
> Error:
> 
> File “/tmp/pip-build-env-wlebbpoz/overlay/lib/ **python_3.12_** /site-packages/setuptools/ **init**.py”, line 10, in import distutils.core ModuleNotFoundError: No module named ‘distutils’

There is a discrepancy between the Docker image and the host system’s Python version.

if the dockerfile is using python 3.11, then the control should go thru python3.11/site-packages/…

---

<div class="post-metadata">

### Author: ![zarir-engineer](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/zarir-engineer/32/4240_2.png) [@zarir-engineer](https://community.taiga.io/u/zarir-engineer)
#### Post date: [March 27, 2025, 9:40am UTC](https://community.taiga.io/t/modulenotfounderror-no-module-named-distutils/6844/3 "2025-03-27T09:40:05Z")

</div>

As an alternative, please advise on how to clear cache of last build so that fresh one does not base on the previous one to save time. This is to ensure that changes in dockerfile to python3.11 reflect in the deployment.

I also observe that this line is not present in dockerfile. How does the build happen ?

docker build --no-cache -f docker/Dockerfile -t taigaio/taiga-back:latest .
