ERROR installing aspose cells python with Dockerfile

Project requirements:

  • Need to use aspose cells python in production for handling corrupted excel files. Right now I’m having an issue installing the lib via dockerfile. Already installed the libgdiplus
  • Production OS: Ubuntu 20.04
  • ERROR: No matching distribution found for aspose-cells-python==24.8.0

@felipebpl,

What Python version are you using? Are you using version 3.12 or a later version? Please also share the complete details of your environment with docker file. We will check your issue soon. Moreover, we recommend you to kindly see the document How to Run Aspose.Cells for python via .NET in Docker|Documentation for your reference.

By the way, you may also refer to the thread (although the thread is related to Aspose.Words for Python, but you may consult it accordingly) to resolve your issue.

@ amjad.sahi,

Thank you so much for your response! I’m currently using Python 3.11. I have an urgent project deadline, so I truly appreciate your assistance. Below is the Dockerfile for your reference:

FROM python:3.11

# Install necessary system dependencies including libgdiplus
RUN apt-get update && apt-get install -y \
    locales \
    tesseract-ocr \
    tesseract-ocr-eng \
    libtesseract-dev \
    libleptonica-dev \
    libgl1-mesa-glx \
    libicu-dev \
    libgdiplus && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Set up locale for pt_BR.UTF-8
RUN echo "pt_BR.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen
ENV LANG=pt_BR.UTF-8 \
    LANGUAGE=pt_BR.UTF-8 \
    LC_ALL=pt_BR.UTF-8

# Install pytesseract and other Python dependencies
RUN pip install pytesseract

# Set up the working directory
WORKDIR /backend

# Copy the requirements and install Python dependencies
COPY requirements.txt /backend
RUN pip install -r requirements.txt

# Expose necessary ports
EXPOSE 9999
EXPOSE 8888
EXPOSE 7777

# Ensure Python output is unbuffered
ENV PYTHONUNBUFFERED 1

# Copy the application code
COPY . /backend/

I’ve already tried other python versions, including 3.12, and they return the same error:

13.86 ERROR: Could not find a version that satisfies the requirement aspose-cells-python==24.8.0 (from versions: none)
13.88 ERROR: No matching distribution found for aspose-cells-python==24.8.0

@felipebpl
Hello, the current Linux version only supports the Linux x86 architecture. Please make sure your architecture is not ARM.
If your Docker is using the Linux ARM architecture, please use the following command in Dockerfile:

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

Additionally, here is a working Dockerfile for your reference.

FROM python:3.11 AS base

# For drawing,e.g. convert to PDF
RUN apt-get update && apt-get install -y libgdiplus

# Install ICU version supported by .NET Core 3.1
RUN wget http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu70_70.1-2_amd64.deb
RUN dpkg -i libicu70_70.1-2_amd64.deb

RUN pip install -i aspose-cells-python
CMD ["python", "aspose_test.py"]

Hope helps a bit.
Thanks!