Repository navigation
Issues when installing Spacy with Docker and Python version 3.12 #13524
Replies: 1 comment
|
The important lines are not the setuptools warnings; they are:
Your Python 3.10 workaround is the safest fix if the project must stay on spaCy 3.6.1: FROM python:3.10-slim
RUN python -m pip install --upgrade pip
RUN python -m pip install -r /backend/requirements.txtIf Python 3.12 is required, upgrade spaCy and its model to a release that publishes CPython 3.12 wheels, then rebuild from a clean Docker cache: FROM python:3.12-slim
RUN python -m pip install --upgrade pip
RUN python -m pip install "spacy>=3.7,<4"
RUN python -m spacy download pt_core_news_lgAdding |
Uh oh!
There was an error while loading. Please reload this page.
How to reproduce the issue
I tried to create a dockerfile for my Django backend and I could not make
docker compose up --buildwith this file:Once I ran that command, I get this error:
My environment
Docker version 26.0.1, build d260a54spacy==3.6.1Important notes
I was able to execute
docker compose up --buildafter I changed my Docker Python flavor topython:3.10.12-sliminstead ofpython:3.12-slim.All reactions