py3-z3 is missing dependency py3-importlib-resources on Alpine 3.19
Hello,
In an Alpine Linux 3.19 containers, installing py3-z3
works fine but running import z3
in Python fails with: ModuleNotFoundError: No module named 'importlib_resources'
. Installing py3-importlib-resources
fixes the issue, so I believe the dependency is missing from the package.
Steps to reproduce:
- Launch a Docker container with image
docker.io/library/alpine:3.19
- Run:
apk add py3-z3 z3-dev && python3
. This installs:z3 (4.12.3-r0)
andz3-dev (4.12.3-r0)
- In the Python interpreter, run:
import z3
. This displays:
/ # python3
Python 3.11.6 (main, Oct 13 2023, 15:52:55) [GCC 13.1.1 20230722] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import z3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.11/site-packages/z3/__init__.py", line 1, in <module>
from .z3 import *
File "/usr/lib/python3.11/site-packages/z3/z3.py", line 46, in <module>
from . import z3core
File "/usr/lib/python3.11/site-packages/z3/z3core.py", line 7, in <module>
import importlib_resources
ModuleNotFoundError: No module named 'importlib_resources'
>>> import importlib_resources
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'importlib_resources'
- To fix this issue, exit the Python interpreter and run
apk add py3-importlib-resources
. Thenpython3
andimport z3
and it works fine.
By the way, this issue does not exist in Alpine Linux Edge: with docker.io/library/alpine:edge
instead of 3.19, py3-z3 4.12.5-r0
gets installed (instead of 4.12.3-r0
) and it works fine without requiring py3-importlib-resources
. On Alpine Linux 3.18 and before, py3-z3
required py3-setuptools
to be installed, and with this it worked fine. Therefore the issue I am experiencing only occurs in Alpine Linux 3.19.
TL;DR: Could you please add py3-importlib-resources
to the dependencies of package py3-z3
in Alpine Linux 3.19?