modoboa / modoboa-installer

An installer for Modoboa
MIT License
254 stars 135 forks source link

ModuleNotFoundError: No module named 'modoboa' #541

Closed isven42 closed 5 months ago

isven42 commented 5 months ago

Impacted versions

Steps to reproduce

cant do update with my current modoboa instance

sudo ./run.py --upgrade #domain# --debug

Full trace using --debug option or current behaviour

Installing modoboa Reading package lists... Building dependency tree... Reading state information... postgresql is already the newest version (14+238). postgresql-server-dev-all is already the newest version (238). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Synchronizing state of postgresql.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable postgresql ● postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled) Active: active (exited) since Sun 2024-03-24 01:45:04 CET; 5s ago Main PID: 1476968 (code=exited, status=0/SUCCESS) CPU: 2ms

Mar 24 01:45:04 systemd[1]: Starting PostgreSQL RDBMS... Mar 24 01:45:04 systemd[1]: Finished PostgreSQL RDBMS. Reading package lists... Building dependency tree... Reading state information... build-essential is already the newest version (12.9ubuntu3). cron is already the newest version (3.0pl1-137ubuntu3). libcairo2-dev is already the newest version (1.16.0-5ubuntu2). libffi-dev is already the newest version (3.4.2-4). libjpeg-dev is already the newest version (8c-2ubuntu10). librrd-dev is already the newest version (1.7.2-3ubuntu6). pkg-config is already the newest version (0.29.2-1ubuntu3). rrdtool is already the newest version (1.7.2-3ubuntu6). redis-server is already the newest version (5:6.0.16-1ubuntu1). supervisor is already the newest version (4.2.1-1ubuntu1). libssl-dev is already the newest version (3.0.2-0ubuntu1.15). libxslt1-dev is already the newest version (1.1.34-4ubuntu0.22.04.1). python3-dev is already the newest version (3.10.6-1~22.04). libxml2-dev is already the newest version (2.9.14+dfsg-0.1+ubuntu20.04.1+deb.sury.org+1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. User modoboa already exists, skipping creation but please make sure the /srv/modoboa directory exists. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: rrdtool in ./.local/lib/python3.10/site-packages (0.1.16) Requirement already satisfied: modoboa in ./.local/lib/python3.10/site-packages (2.2.4) Requirement already satisfied: modoboa-amavis in ./.local/lib/python3.10/site-packages (1.5.1) Requirement already satisfied: modoboa-pdfcredentials in ./.local/lib/python3.10/site-packages (1.5.0) Requirement already satisfied: modoboa-postfix-autoreply in ./.local/lib/python3.10/site-packages (1.8.1) Requirement already satisfied: modoboa-sievefilters in ./.local/lib/python3.10/site-packages (1.7.0) Requirement already satisfied: modoboa-webmail in ./.local/lib/python3.10/site-packages (1.9.0) Requirement already satisfied: modoboa-contacts in ./.local/lib/python3.10/site-packages (1.1.1) Requirement already satisfied: modoboa-radicale in ./.local/lib/python3.10/site-packages (1.7.1) Requirement already satisfied: redis>=4.2.0rc1 in ./.local/lib/python3.10/site-packages (from modoboa) (5.1.0b4) Requirement already satisfied: djangorestframework-simplejwt==5.3.1 in ./.local/lib/python3.10/site-packages (from modoboa) (5.3.1) Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from modoboa) (2.25.1) Requirement already satisfied: lxml==4.9.4 in ./.local/lib/python3.10/site-packages (from modoboa) (4.9.4) Requirement already satisfied: cryptography in /usr/lib/python3/dist-packages (from modoboa) (3.4.8) Requirement already satisfied: dj-database-url in ./.local/lib/python3.10/site-packages (from modoboa) (2.1.0) Requirement already satisfied: qrcode in ./.local/lib/python3.10/site-packages (from modoboa) (7.4.2) Requirement already satisfied: django-xforwardedfor-middleware==2.0 in ./.local/lib/python3.10/site-packages (from modoboa) (2.0) Requirement already satisfied: django-rq in ./.local/lib/python3.10/site-packages (from modoboa) (2.10.2) Requirement already satisfied: django-phonenumber-field[phonenumbers]==7.3.0 in ./.local/lib/python3.10/site-packages (from modoboa) (7.3.0) Requirement already satisfied: django-otp==1.3.0 in ./.local/lib/python3.10/site-packages (from modoboa) (1.3.0) Requirement already satisfied: python-dateutil in ./.local/lib/python3.10/site-packages (from modoboa) (2.9.0.post0) Requirement already satisfied: python-magic>=0.4.24 in /usr/lib/python3/dist-packages (from modoboa) (0.4.24) Requirement already satisfied: dnspython==2.4.2 in ./.local/lib/python3.10/site-packages (from modoboa) (2.4.2) Requirement already satisfied: rq>=1.13.0 in ./.local/lib/python3.10/site-packages (from modoboa) (1.16.1) Requirement already satisfied: oath in ./.local/lib/python3.10/site-packages (from modoboa) (1.4.4) Requirement already satisfied: aiosmtplib in ./.local/lib/python3.10/site-packages (from modoboa) (3.0.1) Requirement already satisfied: django-reversion==5.0.10 in ./.local/lib/python3.10/site-packages (from modoboa) (5.0.10) Requirement already satisfied: gevent==23.9.1 in ./.local/lib/python3.10/site-packages (from modoboa) (23.9.1) Requirement already satisfied: chardet in /usr/lib/python3/dist-packages (from modoboa) (4.0.0) Requirement already satisfied: feedparser==6.0.11 in ./.local/lib/python3.10/site-packages (from modoboa) (6.0.11) Requirement already satisfied: django-filter in ./.local/lib/python3.10/site-packages (from modoboa) (23.5) Requirement already satisfied: defusedxml>=0.6.0 in ./.local/lib/python3.10/site-packages (from modoboa) (0.7.1) Requirement already satisfied: progressbar33==2.4 in ./.local/lib/python3.10/site-packages (from modoboa) (2.4) Requirement already satisfied: asgiref in ./.local/lib/python3.10/site-packages (from modoboa) (3.8.1) Requirement already satisfied: pytz in ./.local/lib/python3.10/site-packages (from modoboa) (2024.1) Requirement already satisfied: django<5.0,>4.0 in ./.local/lib/python3.10/site-packages (from modoboa) (4.2.11) Requirement already satisfied: tldextract>=2.0.2 in ./.local/lib/python3.10/site-packages (from modoboa) (5.1.2) Requirement already satisfied: djangorestframework<3.15,>=3.14 in ./.local/lib/python3.10/site-packages (from modoboa) (3.14.0) Requirement already satisfied: ovh in ./.local/lib/python3.10/site-packages (from modoboa) (1.1.0) Requirement already satisfied: uritemplate in ./.local/lib/python3.10/site-packages (from modoboa) (4.1.1) Requirement already satisfied: bcrypt in /usr/lib/python3/dist-packages (from modoboa) (3.2.0) Requirement already satisfied: Pillow in ./.local/lib/python3.10/site-packages (from modoboa) (10.2.0) Requirement already satisfied: django-ckeditor==6.7.0 in ./.local/lib/python3.10/site-packages (from modoboa) (6.7.0) Requirement already satisfied: django-rename-app==0.1.5 in ./.local/lib/python3.10/site-packages (from modoboa) (0.1.5) Requirement already satisfied: reportlab in ./.local/lib/python3.10/site-packages (from modoboa) (4.1.0) Requirement already satisfied: passlib~=1.7.4 in ./.local/lib/python3.10/site-packages (from modoboa) (1.7.4) Requirement already satisfied: drf-spectacular in ./.local/lib/python3.10/site-packages (from modoboa) (0.27.1) Requirement already satisfied: django-js-asset>=2.0 in ./.local/lib/python3.10/site-packages (from django-ckeditor==6.7.0->modoboa) (2.2.0) Requirement already satisfied: phonenumbers>=7.0.2 in ./.local/lib/python3.10/site-packages (from django-phonenumber-field[phonenumbers]==7.3.0->modoboa) (8.13.32) Requirement already satisfied: pyjwt<3,>=1.7.1 in /usr/lib/python3/dist-packages (from djangorestframework-simplejwt==5.3.1->modoboa) (2.3.0) Requirement already satisfied: sgmllib3k in ./.local/lib/python3.10/site-packages (from feedparser==6.0.11->modoboa) (1.0.0) Requirement already satisfied: greenlet>=2.0.0 in ./.local/lib/python3.10/site-packages (from gevent==23.9.1->modoboa) (3.0.3) Requirement already satisfied: zope.interface in /usr/lib/python3/dist-packages (from gevent==23.9.1->modoboa) (5.4.0) Requirement already satisfied: zope.event in /usr/lib/python3/dist-packages (from gevent==23.9.1->modoboa) (4.4) Requirement already satisfied: html2text in ./.local/lib/python3.10/site-packages (from modoboa-amavis) (2024.2.26) Requirement already satisfied: idna in /usr/lib/python3/dist-packages (from modoboa-amavis) (3.3) Requirement already satisfied: sievelib>=1.1.1 in ./.local/lib/python3.10/site-packages (from modoboa-sievefilters) (1.2.1) Requirement already satisfied: django-webpack-loader==2.0.1 in ./.local/lib/python3.10/site-packages (from modoboa-contacts) (2.0.1) Requirement already satisfied: caldav==1.3.9 in ./.local/lib/python3.10/site-packages (from modoboa-contacts) (1.3.9) Requirement already satisfied: vobject in ./.local/lib/python3.10/site-packages (from modoboa-contacts) (0.9.6.1) Requirement already satisfied: tzlocal in ./.local/lib/python3.10/site-packages (from caldav==1.3.9->modoboa-contacts) (5.2) Requirement already satisfied: icalendar in ./.local/lib/python3.10/site-packages (from caldav==1.3.9->modoboa-contacts) (5.0.12) Requirement already satisfied: recurring-ical-events>=2.0.0 in ./.local/lib/python3.10/site-packages (from caldav==1.3.9->modoboa-contacts) (2.1.3) Requirement already satisfied: drf-nested-routers in ./.local/lib/python3.10/site-packages (from modoboa-radicale) (0.93.5) Requirement already satisfied: sqlparse>=0.3.1 in ./.local/lib/python3.10/site-packages (from django<5.0,>4.0->modoboa) (0.4.4) Requirement already satisfied: typing-extensions>=4 in ./.local/lib/python3.10/site-packages (from asgiref->modoboa) (4.10.0) Requirement already satisfied: async-timeout>=4.0.3 in ./.local/lib/python3.10/site-packages (from redis>=4.2.0rc1->modoboa) (4.0.3) Requirement already satisfied: click>=5 in /usr/lib/python3/dist-packages (from rq>=1.13.0->modoboa) (8.0.3) Requirement already satisfied: requests-file>=1.4 in ./.local/lib/python3.10/site-packages (from tldextract>=2.0.2->modoboa) (2.0.0) Requirement already satisfied: filelock>=3.0.8 in /usr/lib/python3/dist-packages (from tldextract>=2.0.2->modoboa) (3.6.0) Requirement already satisfied: jsonschema>=2.6.0 in /usr/lib/python3/dist-packages (from drf-spectacular->modoboa) (3.2.0) Requirement already satisfied: inflection>=0.3.1 in ./.local/lib/python3.10/site-packages (from drf-spectacular->modoboa) (0.5.1) Requirement already satisfied: PyYAML>=5.1 in /usr/lib/python3/dist-packages (from drf-spectacular->modoboa) (5.4.1) Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->modoboa) (1.16.0) Requirement already satisfied: pypng in ./.local/lib/python3.10/site-packages (from qrcode->modoboa) (0.20220715.0) Requirement already satisfied: x-wr-timezone>=0.0.5 in ./.local/lib/python3.10/site-packages (from recurring-ical-events>=2.0.0->caldav==1.3.9->modoboa-contacts) (0.0.7) Name: modoboa Version: 2.2.4 Summary: Mail hosting made simple Home-page: http://modoboa.org/ Author: Antoine Nguyen Author-email: Antoine Nguyen tonio@ngyn.org License: ISC License

    Copyright (c) 2009-2023, Antoine Nguyen <tonio@ngyn.org>

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Location: /srv/modoboa/.local/lib/python3.10/site-packages Requires: aiosmtplib, asgiref, bcrypt, chardet, cryptography, defusedxml, dj-database-url, django, django-ckeditor, django-filter, django-otp, django-phonenumber-field, django-rename-app, django-reversion, django-rq, django-xforwardedfor-middleware, djangorestframework, djangorestframework-simplejwt, dnspython, drf-spectacular, feedparser, gevent, lxml, oath, ovh, passlib, Pillow, progressbar33, python-dateutil, python-magic, pytz, qrcode, redis, reportlab, requests, rq, rrdtool, tldextract, uritemplate Required-by: modoboa-imap-migration, modoboa-pdfcredentials, modoboa-stats Requirement already satisfied: psycopg[binary]>=3.1 in /usr/local/lib/python3.10/dist-packages (from -r https://raw.githubusercontent.com/modoboa/modoboa/2.2.4/postgresql-requirements.txt (line 1)) (3.1.18) Requirement already satisfied: typing-extensions>=4.1 in /usr/local/lib/python3.10/dist-packages (from psycopg[binary]>=3.1->-r https://raw.githubusercontent.com/modoboa/modoboa/2.2.4/postgresql-requirements.txt (line 1)) (4.10.0) Requirement already satisfied: psycopg-binary==3.1.18 in /usr/local/lib/python3.10/dist-packages (from psycopg[binary]>=3.1->-r https://raw.githubusercontent.com/modoboa/modoboa/2.2.4/postgresql-requirements.txt (line 1)) (3.1.18) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Name: modoboa Version: 2.2.4 Summary: Mail hosting made simple Home-page: http://modoboa.org/ Author: Antoine Nguyen Author-email: Antoine Nguyen tonio@ngyn.org License: ISC License

    Copyright (c) 2009-2023, Antoine Nguyen <tonio@ngyn.org>

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Location: /srv/modoboa/.local/lib/python3.10/site-packages Requires: aiosmtplib, asgiref, bcrypt, chardet, cryptography, defusedxml, dj-database-url, django, django-ckeditor, django-filter, django-otp, django-phonenumber-field, django-rename-app, django-reversion, django-rq, django-xforwardedfor-middleware, djangorestframework, djangorestframework-simplejwt, dnspython, drf-spectacular, feedparser, gevent, lxml, oath, ovh, passlib, Pillow, progressbar33, python-dateutil, python-magic, pytz, qrcode, redis, reportlab, requests, rq, rrdtool, tldextract, uritemplate Required-by: modoboa-imap-migration, modoboa-pdfcredentials, modoboa-stats Name: modoboa Version: 2.2.4 Summary: Mail hosting made simple Home-page: http://modoboa.org/ Author: Antoine Nguyen Author-email: Antoine Nguyen tonio@ngyn.org License: ISC License

    Copyright (c) 2009-2023, Antoine Nguyen <tonio@ngyn.org>

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Location: /srv/modoboa/.local/lib/python3.10/site-packages Requires: aiosmtplib, asgiref, bcrypt, chardet, cryptography, defusedxml, dj-database-url, django, django-ckeditor, django-filter, django-otp, django-phonenumber-field, django-rename-app, django-reversion, django-rq, django-xforwardedfor-middleware, djangorestframework, djangorestframework-simplejwt, dnspython, drf-spectacular, feedparser, gevent, lxml, oath, ovh, passlib, Pillow, progressbar33, python-dateutil, python-magic, pytz, qrcode, redis, reportlab, requests, rq, rrdtool, tldextract, uritemplate Required-by: modoboa-imap-migration, modoboa-pdfcredentials, modoboa-stats Name: modoboa Version: 2.2.4 Summary: Mail hosting made simple Home-page: http://modoboa.org/ Author: Antoine Nguyen Author-email: Antoine Nguyen tonio@ngyn.org License: ISC License

    Copyright (c) 2009-2023, Antoine Nguyen <tonio@ngyn.org>

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Location: /srv/modoboa/.local/lib/python3.10/site-packages Requires: aiosmtplib, asgiref, bcrypt, chardet, cryptography, defusedxml, dj-database-url, django, django-ckeditor, django-filter, django-otp, django-phonenumber-field, django-rename-app, django-reversion, django-rq, django-xforwardedfor-middleware, djangorestframework, djangorestframework-simplejwt, dnspython, drf-spectacular, feedparser, gevent, lxml, oath, ovh, passlib, Pillow, progressbar33, python-dateutil, python-magic, pytz, qrcode, redis, reportlab, requests, rq, rrdtool, tldextract, uritemplate Required-by: modoboa-imap-migration, modoboa-pdfcredentials, modoboa-stats Synchronizing state of redis-server.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable redis-server ● redis-server.service - Advanced key-value store Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2024-03-24 01:34:49 CET; 10min ago Docs: http://redis.io/documentation, man:redis-server(1) Main PID: 1444047 (redis-server) Status: "Ready to accept connections" Tasks: 5 (limit: 19050) Memory: 4.2M CPU: 1.113s CGroup: /system.slice/redis-server.service └─1444047 "/usr/bin/redis-server 127.0.0.1:6379" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""

Mar 24 01:34:49 systemd[1]: Starting Advanced key-value store... Mar 24 01:34:49 systemd[1]: Started Advanced key-value store. NOTICE: view "dkim" does not exist, skipping DROP VIEW Traceback (most recent call last): File "/srv/modoboa/env/bin/modoboa-admin.py", line 3, in from modoboa.core.commands import handle_command_line ModuleNotFoundError: No module named 'modoboa' b'Traceback (most recent call last):\n File "/srv/modoboa/env/bin/modoboa-admin.py", line 3, in \n from modoboa.core.commands import handle_command_line\nModuleNotFoundError: No module named \'modoboa\'\n' root@mail:

isven42 commented 5 months ago

fixed it.

go into venv and installed those packages.

cd /srv/modoboa/env/bin/ source activate ./python3 -m ensurepip python3 -m pip install "modoboa" python3 -m pip install "modoboa_amavis" python3 -m pip install "modoboa_pdfcredentials\" python3 -m pip install "modoboa_pdfcredentials" python3 -m pip install "modoboa_postfix_autoreply" python3 -m pip install "modoboa_sievefilters" python3 -m pip install "modoboa_webmail" python3 -m pip install "modoboa_contacts" python3 -m pip install "modoboa_radicale"