$ docker run -it python:3 bash
root@a66113e60b37:/# python3 --version
Python 3.11.1
root@a66113e60b37:/# python3 -m pip install yangson
Collecting yangson
Downloading yangson-1.4.17-py3-none-any.whl (88 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.5/88.5 kB 4.1 MB/s eta 0:00:00
Collecting PyXB
Downloading PyXB-1.2.6.tar.gz (7.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.0/7.0 MB 25.5 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Building wheels for collected packages: PyXB
Building wheel for PyXB (setup.py) ... done
Created wheel for PyXB: filename=PyXB-1.2.6-py3-none-any.whl size=4957531 sha256=2b7b2d8c2fa2c4da734d15d3d7694106b70cdd1d73e03ccdbf95b42c79f72ff4
Stored in directory: /root/.cache/pip/wheels/42/93/48/6cf78dca9c3f2950d92791ea72f65e69401501b2593675ed27
Successfully built PyXB
Installing collected packages: PyXB, yangson
Successfully installed PyXB-1.2.6 yangson-1.4.17
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
root@a66113e60b37:/# python3
Python 3.11.1 (main, Dec 21 2022, 18:32:57) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import yangson
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.11/site-packages/yangson/__init__.py", line 1, in <module>
from .datamodel import DataModel # NOQA
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yangson/datamodel.py", line 30, in <module>
from .instance import (InstanceRoute, InstanceIdParser, ResourceIdParser,
File "/usr/local/lib/python3.11/site-packages/yangson/instance.py", line 1429, in <module>
from .schemanode import ( # NOQA
File "/usr/local/lib/python3.11/site-packages/yangson/schemanode.py", line 47, in <module>
from .constraint import Must
File "/usr/local/lib/python3.11/site-packages/yangson/constraint.py", line 30, in <module>
from elementpath import RegexError, translate_pattern
ModuleNotFoundError: No module named 'elementpath'
As per the title.
Here's a reproduction: