Steps to Reproduce
Created a new Debian 12 VM and then run the installer script. Script fails at the point where it runs through the database creation.
Believe the issue has to do with Debian 12 default installing Python 3.11.2
root@invtest:/var/log/inventree# cat setup_2024-11-15_18_57_23.log
# POI01| Importing functions
# POI01| Functions imported
# POI03| Setting base environment variables
# POI03| No config file found: /etc/inventree/config.yaml, using envs or defaults
# POI03| Collected environment variables:
# POI03| INVENTREE_MEDIA_ROOT=/opt/inventree/data/media
# POI03| INVENTREE_STATIC_ROOT=/opt/inventree/data/static
# POI03| INVENTREE_BACKUP_DIR=/opt/inventree/data/backup
# POI03| INVENTREE_PLUGINS_ENABLED=true
# POI03| INVENTREE_PLUGIN_FILE=/etc/inventree/plugins.txt
# POI03| INVENTREE_SECRET_KEY_FILE=/etc/inventree/secret_key.txt
# POI03| INVENTREE_DB_ENGINE=sqlite3
# POI03| INVENTREE_DB_NAME=/opt/inventree/data/database.sqlite3
# POI03| INVENTREE_DB_USER=sampleuser
# POI03| INVENTREE_DB_HOST=samplehost
# POI03| INVENTREE_DB_PORT=123456
# POI04| Running in docker: no
# POI05| Using init command: systemctl
# POI06| Getting the IP address of the server via web service
# POI06| IP address is 47.154.159.22
# POI07| No python environment found - using environment variable: python3.9
# POI07| Trying to detecting python3.9 to python3.12 - using newest version
# POI07| Checking for python3.12
# POI07| Checking for python3.11
# POI07| Found python3.11 installed - using for setup python3.11
# POI07| Using python command: python3.11
# POI08| Checking if update checks are needed
# POI08| Normal install - no need for checks
# POI09| Setting up python environment
Collecting invoke
Downloading invoke-2.2.0-py3-none-any.whl (160 kB)
ββββββββββββββββββββββββββββββββββββββββ 160.3/160.3 kB 5.8 MB/s eta 0:00:00
Collecting wheel
Downloading wheel-0.45.0-py3-none-any.whl (72 kB)
ββββββββββββββββββββββββββββββββββββββββ 72.5/72.5 kB 10.4 MB/s eta 0:00:00
Installing collected packages: wheel, invoke
Successfully installed invoke-2.2.0 wheel-0.45.0
# POI09| Unlinking default nginx config\n# POI09| Old file still in /etc/nginx/sites-available/default
# POI09| Unlinked default nginx config
# POI09| Stopping nginx
# POI09| Stopped nginx
# POI09| Setting up nginx to /etc/nginx/sites-enabled/inventree.conf
# POI09| Starting nginx
# POI09| Started nginx
# POI09| (Re)creating init scripts
Created symlink /etc/systemd/system/multi-user.target.wants/inventree.service β /etc/systemd/system/inventree.service.
Created symlink /etc/systemd/system/inventree.service.wants/inventree-web.service β /etc/systemd/system/inventree-web.service.
Scaling up...
Created symlink /etc/systemd/system/inventree-web.service.wants/inventree-web-1.service β /etc/systemd/system/inventree-web-1.service.
--> done.
Created symlink /etc/systemd/system/inventree.service.wants/inventree-worker.service β /etc/systemd/system/inventree-worker.service.
Scaling up...
Created symlink /etc/systemd/system/inventree-worker.service.wants/inventree-worker-1.service β /etc/systemd/system/inventree-worker-1.service.
--> done.
# POI09| Enabling InvenTree on boot
# POI09| Enabled InvenTree on boot
# POI10| Creating admin user data
# POI11| Stopping InvenTree
# POI11| Stopped InvenTree
# POI12| Updating InvenTree
Collecting uv
Downloading uv-0.5.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.2 MB)
ββββββββββββββββββββββββββββββββββββββββ 14.2/14.2 MB 13.6 MB/s eta 0:00:00
Requirement already satisfied: wheel in ./env/lib/python3.11/site-packages (0.45.0)
Installing collected packages: uv
Successfully installed uv-0.5.2
Using Python 3.11.2 environment at env
Resolved 137 packages in 2.26s
Prepared 137 packages in 3.83s
Uninstalled 1 package in 16ms
Installed 137 packages in 211ms
+ asgiref==3.8.1
+ async-timeout==4.0.3
+ attrs==23.2.0
+ babel==2.15.0
+ bleach==6.1.0
+ brotli==1.1.0
+ certifi==2024.7.4
+ cffi==1.16.0
+ charset-normalizer==3.3.2
+ coreapi==2.3.3
+ coreschema==0.0.4
+ cryptography==42.0.8
+ cssselect2==0.7.0
+ defusedxml==0.7.1
+ deprecated==1.2.14
+ diff-match-patch==20230430
+ dj-rest-auth==6.0.0
+ django==4.2.15
+ django-allauth==0.63.3
+ django-allauth-2fa==0.11.1
+ django-cleanup==8.1.0
+ django-cors-headers==4.4.0
+ django-crispy-forms==1.14.0
+ django-dbbackup==4.1.0
+ django-error-report-2==0.4.2
+ django-filter==24.2
+ django-flags==5.0.13
+ django-formtools==2.5.1
+ django-ical==1.9.2
+ django-import-export==3.3.9
+ django-js-asset==2.2.0
+ django-maintenance-mode==0.21.1
+ django-markdownify==0.9.5
+ django-money==3.2.0
+ django-mptt==0.16.0
+ django-otp==1.5.0
+ django-picklefield==3.2
+ django-q-sentry==0.1.6
+ django-q2==1.6.2
+ django-recurrence==1.11.1
+ django-redis==5.4.0
+ django-sesame==3.2.2
+ django-sql-utils==0.7.0
+ django-sslserver==0.22
+ django-stdimage==6.0.2
+ django-taggit==5.0.1
+ django-user-sessions==2.0.0
+ django-weasyprint==2.3.0
+ django-xforwardedfor-middleware==2.0
+ djangorestframework==3.14.0
+ djangorestframework-simplejwt==5.3.1
+ drf-spectacular==0.27.2
+ dulwich==0.22.1
+ et-xmlfile==1.1.0
+ feedparser==6.0.11
+ fonttools==4.53.0
+ googleapis-common-protos==1.63.2
+ grpcio==1.64.1
+ gunicorn==22.0.0
+ html5lib==1.1
+ icalendar==5.0.13
+ idna==3.7
+ importlib-metadata==7.1.0
+ inflection==0.5.1
+ isodate==0.6.1
+ itypes==1.2.0
+ jinja2==3.1.4
+ jsonschema==4.22.0
+ jsonschema-specifications==2023.12.1
+ lxml==5.2.2
+ markdown==3.6
+ markuppy==1.14
+ markupsafe==2.1.5
+ odfpy==1.4.1
+ openpyxl==3.1.4
+ opentelemetry-api==1.25.0
+ opentelemetry-exporter-otlp==1.25.0
+ opentelemetry-exporter-otlp-proto-common==1.25.0
+ opentelemetry-exporter-otlp-proto-grpc==1.25.0
+ opentelemetry-exporter-otlp-proto-http==1.25.0
+ opentelemetry-instrumentation==0.46b0
+ opentelemetry-instrumentation-django==0.46b0
+ opentelemetry-instrumentation-redis==0.46b0
+ opentelemetry-instrumentation-requests==0.46b0
+ opentelemetry-instrumentation-wsgi==0.46b0
+ opentelemetry-proto==1.25.0
+ opentelemetry-sdk==1.25.0
+ opentelemetry-semantic-conventions==0.46b0
+ opentelemetry-util-http==0.46b0
+ packaging==24.1
+ pdf2image==1.17.0
+ pillow==10.3.0
+ pint==0.21
+ pip-licenses==4.4.0
+ prettytable==3.10.0
+ protobuf==4.25.3
+ py-moneyed==3.0
+ pycparser==2.22
+ pydyf==0.10.0
+ pyjwt==2.8.0
+ pyphen==0.15.0
+ pypng==0.20220715.0
+ python-barcode==0.15.1
+ python-dateutil==2.9.0.post0
+ python-dotenv==1.0.1
+ python-fsutil==0.14.1
+ python3-openid==3.2.0
+ python3-saml==1.16.0
+ pytz==2024.1
+ pyyaml==6.0.1
+ qrcode==7.4.2
+ rapidfuzz==3.9.3
+ redis==5.0.7
+ referencing==0.35.1
+ regex==2024.4.28
+ requests==2.32.3
+ rpds-py==0.18.1
+ sentry-sdk==2.8.0
- setuptools==75.5.0
+ setuptools==72.1.0
+ sgmllib3k==1.0.0
+ six==1.16.0
+ sqlparse==0.5.0
+ tablib==3.5.0
+ tinycss2==1.2.1
+ typing-extensions==4.12.2
+ uritemplate==4.1.1
+ urllib3==2.2.2
+ wcwidth==0.2.13
+ weasyprint==61.2
+ webencodings==0.5.1
+ whitenoise==6.7.0
+ wrapt==1.16.0
+ xlrd==2.0.1
+ xlwt==1.3.0
+ xmlsec==1.3.14
+ zipp==3.19.2
+ zopfli==0.2.3
Plugin configuration file does not exist - creating default file
warning: Requirements file /etc/inventree/plugins.txt does not contain any dependencies
Using Python 3.11.2 environment at env
Audited in 2ms
Traceback (most recent call last):
File "/opt/inventree/src/backend/InvenTree/manage.py", line 24, in <module>
main()
File "/opt/inventree/src/backend/InvenTree/manage.py", line 20, in main
execute_from_command_line(sys.argv)
File "/opt/inventree/env/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/inventree/env/lib/python3.11/site-packages/django/core/management/__init__.py", line 416, in execute
django.setup()
File "/opt/inventree/env/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/opt/inventree/env/lib/python3.11/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/inventree/env/lib/python3.11/site-packages/django/apps/config.py", line 178, in create
mod = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1128, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/opt/inventree/src/backend/InvenTree/plugin/__init__.py", line 4, in <module>
from .plugin import InvenTreePlugin
File "/opt/inventree/src/backend/InvenTree/plugin/plugin.py", line 16, in <module>
from InvenTree.helpers import pui_url
File "/opt/inventree/src/backend/InvenTree/InvenTree/helpers.py", line 26, in <module>
import regex
File "/opt/inventree/env/lib/python3.11/site-packages/regex/__init__.py", line 1, in <module>
from .regex import *
File "/opt/inventree/env/lib/python3.11/site-packages/regex/regex.py", line 417, in <module>
import regex._regex_core as _regex_core
File "/opt/inventree/env/lib/python3.11/site-packages/regex/_regex_core.py", line 21, in <module>
import regex._regex as _regex
ModuleNotFoundError: No module named 'regex._regex'
# POI12| u | Installing required python packages from 'src/backend/requirements.txt'
# POI12| u | Requirement already satisfied: uv in ./env/lib/python3.11/site-packages (0.5.2)
# POI12| u | Requirement already satisfied: setuptools in ./env/lib/python3.11/site-packages (66.1.1)
# POI12| u | Collecting setuptools
# POI12| u | Downloading setuptools-75.5.0-py3-none-any.whl (1.2 MB)
# POI12| u | ββββββββββββββββββββββββββββββββββββββββ 1.2/1.2 MB 10.2 MB/s eta 0:00:00
# POI12| u | Installing collected packages: setuptools
# POI12| u | Attempting uninstall: setuptools
# POI12| u | Found existing installation: setuptools 66.1.1
# POI12| u | Uninstalling setuptools-66.1.1:
# POI12| u | Successfully uninstalled setuptools-66.1.1
# POI12| u | Successfully installed setuptools-75.5.0
# POI12| u | Installing plugin packages from '/etc/inventree/plugins.txt'
# POI12| u | Requirement already satisfied: uv in ./env/lib/python3.11/site-packages (0.5.2)
# POI12| u | Python version 3.11.2 - /opt/inventree/env/bin/python3
# POI12| u | InvenTree configuration file 'config.yaml' not found - creating default file
# POI12| u | Created config file /etc/inventree/config.yaml
# POI12| Set permissions for data dir and media: /opt/inventree/data
# POI13| Setting up InvenTree config values
# POI13| Writing the settings to the config file /etc/inventree/config.yaml
# POI13| Done setting up InvenTree config values
# POI14| Setting up InvenTree site URL
# POI15| Starting InvenTree
# POI15| Started InvenTree
# POI16| Printing Final message
####################################################################################
This InvenTree install uses nginx, the settings for the webserver can be found in
/etc/nginx/sites-enabled/inventree.conf
Try opening InvenTree with either
http://localhost/ or http://
Admin user data:
Email: [email protected]
Username: admin
Password:
####################################################################################
# POI17| Running postinstall script - done - Fri Nov 15 06:57:44 PM PST 2024
root@invtest:/var/log/inventree#
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too