[mythtv-users] possible to just build bindings?
Stephen Worthington
stephen_agent at jsw.gen.nz
Mon Feb 10 08:14:15 UTC 2025
On Mon, 10 Feb 2025 00:53:31 -0600, you wrote:
>Thanks Stephen,
>
>I must have messed something up. When I run that python3 -c "import MythTV"
>I get the following error:
>python3 -c "import MythTV"
>Traceback (most recent call last):
> File "<string>", line 1, in <module>
>ModuleNotFoundError: No module named 'MythTV'
>
>However I do have the libmyth-python installed, and I reinstalled it, but
>still get the error above.
>
>When I switch to a different conda environment that I have setup for this
>project, I get the same error.
>
>in my base environment, when I cd to the /usr/lib/python3/dist-packages and
>run it again I get
>
>/usr/lib/python3/dist-packages$ python3 -c "import MythTV"
>Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "/usr/lib/python3/dist-packages/MythTV/__init__.py", line 38, in
><module>
> from .connections import dbmodule
> File "/usr/lib/python3/dist-packages/MythTV/connections.py", line 14, in
><module>
> import lxml.etree as etree
>ModuleNotFoundError: No module named 'lxml.etree'
>
>I tried reinstalling libmyth-python via apt, and that went fine, but
>didnt change anything.
>
>Ideas?
>
>
>-- George
It looks like your Python setup is bad somewhere. Python 3 finds its
packages like MythTV by searching sys.path. So what does this show?
python3 -c "import sys;print(sys.path)"
On Ubuntu 24.04.1, from root I get:
['', '/usr/lib/python312.zip', '/usr/lib/python3.12',
'/usr/lib/python3.12/lib-dynload',
'/usr/local/lib/python3.12/dist-packages',
'/usr/lib/python3/dist-packages']
And from my mythfrontend user I get:
['', '/usr/lib/python312.zip', '/usr/lib/python3.12',
'/usr/lib/python3.12/lib-dynload',
'/home/stephen/.local/lib/python3.12/site-packages',
'/usr/local/lib/python3.12/dist-packages',
'/usr/lib/python3/dist-packages']
More information about the mythtv-users
mailing list