[mythtv-users] possible to just build bindings?
George Bingham
georgeb1962 at gmail.com
Mon Feb 10 17:39:35 UTC 2025
On Mon, Feb 10, 2025 at 2:14 AM Stephen Worthington <
stephen_agent at jsw.gen.nz> wrote:
> 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']
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
Thanks again Stephen,
I think I understand whats going wrong. I am using conda because of the
instructions I was following, presumably to prevent this kind of problem in
the first place. When using the conda environment for this project, my path
does not include the python3 thats original to my machine. When I
deactivate conda, I can import MythTV without error. But it wont work for
my project because of the other dependencies that were all downloaded
specific to the projects conda environment.
I'm not sure how to proceed. I don't want to start over without using
conda, probably can't even without really screwing things up. But I hoped
to augment this project by utilizing some of mythtvs services api. Can I
simply add '/usr/lib/python3/dist-packages' to my path in the conda
environment? Note that the conda environment utilizes python 3.12, while
its 3.10 natively on my machine.
Thanks for your help.
--George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20250210/bb230b09/attachment.htm>
More information about the mythtv-users
mailing list