omv-mkaptidx error No module named 'apt'

  • I am not sure what to do now. I installed miniconda because it was a prerequisite for syncrclone. But I was not aware of the impliciations...

    So now for every apt update I am getting this error message

    File "/usr/sbin/omv-mkaptidx", line 38, in <module>

    import apt

    ModuleNotFoundError: No module named 'apt'


    Although apt update finishes still with 'All packages are up to date.' I don't know how to fix that error.

    reinstalling python3-apt didn't fix it.

    python and python3 are linked now to /opt/miniconda3/bin/python and python3


    I have to admit I don't know a lot of python and how the administration of different versions work.

    Any explanation of what happend would be very much appreciated.

  • So if I remove miniconda3 or rename the folder the error disappears because python3 is now /usr/bin/python3 again.

    Otherwise it's /miniconda3/bin/python3.

    What do I need to do to use both? Because syncrclone needs python 3.6+...

  • permafrost

    Changed the title of the thread from “Think I made a mistake installing miniconda3, getting error now: No module named 'apt'” to “omv-mkaptidx error No module named 'apt'”.
  • permafrost

    Added the Label OMV 6.x (beta)
  • For anybody coming across this, most likely this issue is that your environment is referencing an older version of Python3 (in my case was Pyton 3.7 since i use pyenv).


    To check see what system has referenced as python3:

    `which python3`


    It should be `/usr/bin/python3` the installed version, which for me is 3.9 but environment was pointing to 3.7 version of pyenv.


    You can either edit the file itself and change it from `/usr/bin/env python3` to `/usr/bin/python3` or map back python3 env to native `/usr/bin/python3` and change whatever you need the older version of python3 to

    • Official Post

    We warn people all the time not to change the version of python, python libs, saltstack. You won't have these problems if you don't change them. Between docker, lxc, kvm, there are lots of ways to not cause issue with the host and keep your OMV setup clean.

    omv 8.0.10-2 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.7 | compose 8.1.4 | cterm 8.0 | borgbackup 8.1.6 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!