所以我最近升级了我的mailinabox安装,之后当我尝试启动mailinabox服务时,我在控制台上得到这个错误文件“/root/mailinabox/management/auth.py“,from expiringdict import ExpiringDict ModuleNotFoundError:没有名为“expiringdict”的模块我已经尝试和安装模块手动使用pip但它就是不工作
von4xj4u1#
Mailinabox有自己的库目录。我通过运行以下命令发现了这一点:
# 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:#解释器(/usr/bin/python3)以及通过
# head -n1 /root/mailinabox/management/daemon.py
# /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现在,知道了mailinbox库的目录,您可以从标准目录创建符号链接:
cd /usr/local/lib/mailinabox/env/lib/python3.6/site-packagesln -s /usr/lib/python3/dist-packages/expiringdict expiringdictln -s /usr/lib/python3/dist-packages/expiringdict-1.1.2.egg-info expiringdict-1.1.2.egg-info
1条答案
按热度按时间von4xj4u1#
Mailinabox有自己的库目录。我通过运行以下命令发现了这一点:
# 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:#解释器(/usr/bin/python3)以及通过
# 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
现在,知道了mailinbox库的目录,您可以从标准目录创建符号链接:
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