How to pip install aspose in a docker container

Hi
I’m trying to pip install aspose-words for my python project, but while locally there is no problem, when I’using the dockerfile from the documentation

# Start image python_3.11_bullseye
FROM python:3.11-bullseye
RUN apt update
RUN apt install -y wget
RUN wget http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.8_all.deb
RUN apt install -y ./ttf-mscorefonts-installer_3.8_all.deb
RUN apt install -y libgdiplus
RUN python3 -m pip install --upgrade pip
# End image python_3.11_bullseye

or other builds from that list I get this error:

pip install aspose-words
ERROR: Could not find a version that satisfies the requirement aspose-words (from versions: none)
ERROR: No matching distribution found for aspose-words

also trying to list all available versions has no result:

pip index versions aspose-words
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
ERROR: No matching distribution found for aspose-words

Does anyone know what the problem is?

@mfizz I have tested with a simple docker file as the following for testing and it works fine on my side:

FROM python:3.11-bullseye

RUN apt-get update && apt-get install -y gcc libpq-dev graphviz

RUN pip install aspose-words

# Copy function code
COPY app.py ./

ENTRYPOINT ["python3", "app.py"]

The problem on your side might occur because you are running docker under ARM architecture. Aspose.Words for Python does not yet support Linux ARM architecture.

1 Like

Thank you, that was the case. A simple:

FROM --platform=linux/amd64 python:3.11-bullseye

solved the issue.

@mfizz It is perfect that you managed to resolve the problem. I have linked this topic to the WORDSNET-26390 feature request. We will let you know once Linux ARM version of Aspose.Words for Python is available.