[mythtv-users] V35 install on Archlinux using cmake is missing python modules used in find_orphans.py

Bill Meek keemllib at gmail.com
Wed Feb 19 19:19:21 UTC 2025




On Wednesday 19 February 2025 12:50:16 PM (-06:00), Roland Ernst wrote:

> On Wed, Feb 19, 2025 at 7:13 PM Bill Meek <keemllib at gmail.com> wrote:
> 
> >
> >
> > On Wednesday 19 February 2025 12:07:45 PM (-06:00), James Abernathy wrote:
> >
> > > On Wed, Feb 19, 2025 at 11:44 AM James Abernathy <jfabernathy at gmail.com>
> > > wrote:
> > >
> > > >
> > > >
> > > > On Wed, Feb 19, 2025 at 11:22 AM Bill Meek <keemllib at gmail.com> wrote:
> > > >
> > > >>
> > > >>
> > > >>
> > > >> On Wednesday 19 February 2025 09:53:55 AM (-06:00), James Abernathy
> > wrote:
> > > >>
> > > >> > On Wed, Feb 19, 2025 at 10:47 AM Bill Meek <keemllib at gmail.com>
> > wrote:
> > > >> >
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> > > On Wednesday 19 February 2025 08:24:29 AM (-06:00), James
> > Abernathy
> > > >> wrote:
> > > >> > >
> > > >> > > > On Wed, Feb 19, 2025 at 9:21 AM James Abernathy <
> > > >> jfabernathy at gmail.com>
> > > >> > > > wrote:
> > > >> > > >
> > > >> > > > >
> > > >> > > > >
> > > >> > > > > On Wed, Feb 19, 2025 at 9:11 AM glen <glenb at glenb.net> wrote:
> > > >> > > > >
> > > >> > > > >> On Wed, 2025-02-19 at 07:42 -0500, James Abernathy wrote:
> > > >> > > > >>
> > > >> > > > >> So I've got a successful build of Mythtv on Archlinux using
> > the
> > > >> v35
> > > >> > > cmake
> > > >> > > > >> method. I used ansible for my dependencies and it works fine
> > as
> > > >> far
> > > >> > > as I
> > > >> > > > >> can tell.
> > > >> > > > >>
> > > >> > > > >> However when I try find_orphans.py I get:
> > > >> > > > >>
> > > >> > > > >> ./find_orphans.py
> > > >> > > > >> Traceback (most recent call last):
> > > >> > > > >> File "/home/jim/Downloads/./find_orphans.py", line 3, in
> > > >> <module>
> > > >> > > > >> from MythTV import MythDB, MythBE, Recorded, MythError
> > > >> > > > >> ModuleNotFoundError: No module named 'MythTV'
> > > >> > > > >>
> > > >> > > > >> I built using sudo like this:
> > > >> > > > >>
> > > >> > > > >> sudo cmake --preset qt5 -DCMAKE_INSTALL_PREFIX=/usr 2>&1 |
> > tee
> > > >> > > > >> ~/stage1-log
> > > >> > > > >> sudo cmake --build build-qt5 2>&1 | tee ~/stage2.log
> > > >> > > > >>
> > > >> > > > >> I looked through the stage1 and 2 log files I teed off and
> > > >> didn't see
> > > >> > > > >> anything missing except qt5webkit which is not needed.
> > > >> > > > >>
> > > >> > > > >> I can post those logs to Google Drive if needed.
> > > >> > > > >>
> > > >> > > > >> Jim A
> > > >> > > > >>
> > > >> > > > >>
> > > >> > > > >
> > > >> > > > >> is mythtv folder in the latest python on your machine in
> > > >> > > site-packages ?
> > > >> > > > >>
> > > >> > > > >
> > > >> > > > > No it seems that the build process didn't even build them???
> > > >> > > > >
> > > >> > > > > sudo updatedb
> > > >> > > > > sudo plocate site-packages | grep -i mythtv
> > > >> > > > >
> > > >> > > > > Shows nothing.
> > > >> > > > >
> > > >> > > > > Jim A
> > > >> > > > >
> > > >> > > >
> > > >> > > > BTW the link to the google drive with the stage 1&2 logs is:
> > > >> > > >
> > > >> > > >
> > > >> > >
> > > >>
> > https://drive.google.com/drive/folders/1v4beUzxygecF5_Sq4g2OR1s7s6CN9W4u?usp=drive_link
> > > >> > > >
> > > >> > > > Jim A
> > > >> > >
> > > >> > > 1. I see pip is missing and it's not in ansible, please try
> > pacman and
> > > >> > > install python-pip
> > > >> > > And python3-pip (I don't see any python3 packages in the pacman
> > > >> ansible
> > > >> > > tasks.)
> > > >> > > I'll push if one of those works.
> > > >> > >
> > > >> > > 2. If it doesn't help, try adding this:
> > -DMYTH_BINDINGS_INSTALL_ROOT=/
> > > >> > >
> > > >> > >
> > > >> > > 3. Are you running cmake as root?
> > > >> > > Including user overrides
> > > >> /root/.config/MythTV/BuildOverridesPost.cmake
> > > >> > > That's my choice as I mimic the 'old' make/sudo make install.
> > > >> > > --
> > > >> > > Bill
> > > >> >
> > > >> >
> > > >> > python-pip was missing and I installed it. However, python3-pip is
> > not
> > > >> > found on the Arch repository.
> > > >> >
> > > >> > I'll see what I can do with that.
> > > >> >
> > > >> > Jim A
> > > >>
> > > >> Looks like: https://wiki.archlinux.org/title/Python#Other_versions is
> > > >> one of the
> > > >> answers. If typing: python --version now shows 2.7, then I don't
> > > >> understand.
> > > >> That's been EOL since 1/1/2020.
> > > >>
> > > >> Don't know if all packages python3 packages used here are on AUR (and
> > my
> > > >> Dockere is broken right now).
> > > >> --
> > > >> Bill
> > > >>
> > > >>
> > > > That error is the same one I get if I try to build from source like the
> > > > wiki says using the old ./configure, make, sudo make install. I can do
> > an
> > > > install fine with the AUR package, mythtv-git, but I have to modify the
> > > > PKGBUILD file to use v35 and eliminate the python-future dependency.
> > > > However, I can't remember the last time I did that successfully if I
> > test
> > > > find_orphans.py.
> > > >
> > > > I'm betting it's a dependency issue, but having to depend on AUR
> > > > maintainers for weird Python packages is suspect at best. In my NUCBOX,
> > > > it's easy to switch out the NVME drive and test something else. So I've
> > > > pulled the Arch SSD and put it in timeout so it can think about how it
> > > > screwed up. In the meantime I'll test something on Debian that I
> > wanted to
> > > > do for comparison.
> > > >
> > > > I did find something about pip and AUR. I can't say I understand all
> > of it:
> > > >
> > > > All python PKGBUILDs are built with --without-ensurepip, and pip is
> > > > provided via the python-pip package, which is built for the system-wide
> > > > python environment as a "site-packages" package. If you build any other
> > > > python version from the AUR, then you're supposed to use virtual
> > > > environments for any of those other python versions. In those virtual
> > > > environments, pip gets installed separately, and this is where you can
> > also
> > > > upgrade or even remove it.
> > > >
> > > > $ yay -S python311
> > > > $ python -m virtualenv -p /usr/bin/python3.11 /path/to/venv
> > > > $ source /path/to/venv/bin/activate
> > > > $ python --version
> > > > $ python -m pip --version
> > > >
> > > > Jim A
> > > >
> > >
> > >
> > > As a comparison, on an Archlinux VM I used the ansible dependencies for
> > > mythtv and then git cloned the AUR mythtv-git.
> > >
> > > I modified only the fixes/35 from 34 in the PKGBUILD file, and then built
> > > the package with makepkg -si
> > >
> > > Once it complete I did the sudo updatedb, plocate site-packages | grep -i
> > > mythtv and this time I got a bunch of files.
> > >
> > > So I have not built a full mythtv combo BE/FE but this answers part of
> > the
> > > question.
> > >
> > > Something is different between the new cmake build and the old
> > ./configure,
> > > make, sudo make install that is keeping the python bindings from being
> > > built for Archlinux.
> > >
> > > Jim A
> >
> >
> > Did you try adding: -DMYTH_BINDINGS_INSTALL_ROOT=/
> > on your cmake command line?
> >
> > --
> > Bill
> >
> 
> Jim,
> what does the file "MythTV/_versions.py" state as "INSTALL_PREFIX" on the
> ArchLinux build?
> Does it match the path of the installed MythTV python bindings?

I'm watching too, because I'm making changes to ansible for archlinux:latest
and see this:


    $ grep INSTALL_PREFIX mythtv/bindings/python/MythTV/_versions.py.in 
   INSTALL_PREFIX = '@MYTHTV_INSTALL_PREFIX@'


> > Something is different between the new cmake build and the old
> ./configure,
> > make, sudo make install that is keeping the python bindings from being
> > built for Archlinux.
> 
> Nothing is different between the old make and the new cmake process.
> If the python installation is protected by the file "EXTERNALLY-MANAGED"
> no one except the package manager is allowed to install to it.
> 
> Roland

Also, yes this exists:

   /usr/lib/python3.13/EXTERNALLY-MANAGED
-- 
Bill


More information about the mythtv-users mailing list