skip to Main Content

So i recently upgraded my mailinabox installation and after that when I try to start the mailinabox service I get this error on the console

File "/root/mailinabox/management/auth.py",
from expiringdict import ExpiringDict
ModuleNotFoundError: No module named ‘expiringdict’

I have tried and installed the modules manually using pip but it just doesn’t work

2

Answers


  1. Mailinabox has its own library directory. I found out about this by running the following commands:

    # grep -R python3 /root/mailinabox/management/*.py

    /root/mailinabox/management/cli.py:#!/usr/bin/python3
    /root/mailinabox/management/daemon.py:#!/usr/local/lib/mailinabox/env/bin/python3
    /root/mailinabox/management/mailconfig.py:# interpreter (/usr/bin/python3) as well as through the

    # head -n1 /root/mailinabox/management/daemon.py

    #!/usr/local/lib/mailinabox/env/bin/python3

    # /usr/local/lib/mailinabox/env/bin/python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"

    /usr/local/lib/mailinabox/env/lib/python3.6/site-packages

    Now, knowing the directory for the mailinbox libraries, you can make symbolic links from the standard directory:

    cd /usr/local/lib/mailinabox/env/lib/python3.6/site-packages

    ln -s /usr/lib/python3/dist-packages/expiringdict expiringdict

    ln -s /usr/lib/python3/dist-packages/expiringdict-1.1.2.egg-info expiringdict-1.1.2.egg-info

    Login or Signup to reply.
  2. This command should solve the problem

    # /usr/local/lib/mailinabox/env/bin/pip3 install expiringdict

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search