Skip to content

BUG: pandas can't detect matplotlib on nanoserver (works fine on servercore) #57681

@robin-deltares

Description

@robin-deltares

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

#FROM mcr.microsoft.com/windows/servercore:ltsc2022
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022

ADD python C:/python
RUN setx path "C:\python;C:\python\scripts;%PATH%"
RUN python -m pip install matplotlib pandas

<< Then use pandas inside container >>

Issue Description

Build a Docker container using mcr.microsoft.com/windows/nanoserver:ltsc2022 with python (identical behavior with 3.7 and 3.12) and any versions of pandas+matplotlib.

Use pandas library.

File "C:\python\Lib\site-packages\pandas\plotting_core.py", line 1874, in _load_backend
raise ImportError(
ImportError: matplotlib is required for plotting when the default backend "matplotlib" is selected.

Works fine when running identical code on mcr.microsoft.com/windows/servercore:ltsc2022 Docker container.

Expected Behavior

Should work with nanoserver too.

Installed Versions

Tried with many versions of pandas and matplotlib.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugNeeds InfoClarification about behavior needed to assess issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions