Skip to content

Fatal Python error: init_fs_encoding in Alpine + Python 3.12 during Docker build #1053

@Farinaz94

Description

@Farinaz94

I'm trying to build a Docker image using the following base images:

  • mundialis/actinia:alpine-dependencies-2024-12-14
  • osgeo/grass-gis:releasebranch_8_4-alpine

Inside the Dockerfile, when I run this line:

RUN /usr/bin/python -m venv --system-site-packages --without-pip /opt/venv
I get the following error:
"Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
SyntaxError: source code string cannot contain null bytes"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions