Repository navigation
Closed
Description
Deployment Method
- Installer
- Docker Development
- Docker Production
- Bare metal Development
- Bare metal Production
- Digital Ocean image
- Other (please provide a link
Steps to Reproduce
Describe the problem*
I'm on an Ubuntu 22.04.4 LTS server running python 3.10, but the Inventree installer can't find the python environment so the install fails.
Steps to Reproduce
- Docs used: Installation docs also comment from matmair in this support thread that said to use
apt install inventree --reinstall && inventree run web - apt-get update
- apt-get upgrade
- apt install inventree --reinstall && inventree run web
Relevant log output
root@lakesnake:~$ python --version
Python 3.10.12
root@lakesnake:/home/sara# apt install inventree --reinstall && inventree run web
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
Need to get 0 B/64.5 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 152704 files and directories currently installed.)
Preparing to unpack .../inventree_0.15.3-1716835122.d4d9aa9d.focal_amd64.deb ...
Unpacking inventree (0.15.3-1716835122.d4d9aa9d.focal) over (0.15.3-1716835122.d4d9aa9d.focal) ...
Setting up inventree (0.15.3-1716835122.d4d9aa9d.focal) ...
# Setting base environment variables
# No config file found: /etc/inventree/config.yaml, using envs or defaults
# Collected environment variables:
# INVENTREE_MEDIA_ROOT=/opt/inventree/data/media
# INVENTREE_STATIC_ROOT=/opt/inventree/data/static
# INVENTREE_BACKUP_DIR=/opt/inventree/data/backup
# INVENTREE_PLUGINS_ENABLED=true
# INVENTREE_PLUGIN_FILE=/etc/inventree/plugins.txt
# INVENTREE_SECRET_KEY_FILE=/etc/inventree/secret_key.txt
# INVENTREE_DB_ENGINE=sqlite3
# INVENTREE_DB_NAME=/opt/inventree/data/database.sqlite3
# INVENTREE_DB_USER=sampleuser
# INVENTREE_DB_HOST=samplehost
# INVENTREE_DB_PORT=123456
# Getting the IP address of the server via web service
IP address is xxx.xxx.xxx.xxx [Note: masked for privacy, but this shows our actual IP address here and also below]
# No python environment found - using python3.9
# Setting up python environment
bash: line 1: python3.9: command not found
bash: line 1: env/bin/pip: No such file or directory
# Stopping nginx
# Setting up nginx to /etc/nginx/sites-enabled/inventree.conf
# Starting nginx
# (Re)creating init scripts
Nothing to do.
Nothing to do.
# Enabling InvenTree on boot
# Admin data already exists - skipping
# Stopping InvenTree
# Updating InvenTree
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: wheel in /usr/lib/python3/dist-packages (0.37.1)
bash: line 1: invoke: command not found
# Set permissions for data dir and media: /opt/inventree/data
# Setting up InvenTree config values
# Writing the settings to the config file /etc/inventree/config.yaml
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
sed: can't read /etc/inventree/config.yaml: No such file or directory
chown: cannot access '/etc/inventree/config.yaml': No such file or directory
# Starting InvenTree
####################################################################################
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://xxx.xxx.xxx.xxx/
Admin user data:
Email:
Username:
Password:
####################################################################################
Scanning processes...
Scanning processor microcode...
Scanning linux images...
Running kernel seems to be up-to-date.
The processor microcode seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
/opt/inventree/vendor/pkgr/processes/web: 2: exec: env/bin/gunicorn: not found
Activity
matmair commentedon Jun 13, 2024
Currently, only python3.9 is tested for. Using other versions is possible but you might run into issues. You can manually bypass this by setting SETUP_PYTHON to the python run command you want to use eg. python3.10
matmair commentedon Jun 13, 2024
See #7377
fix: Add installer check for python version
fix: Add installer check for python version (#7440)
fix: Add installer check for python version (#7440) (#7441)
fix: Add installer check for python version (inventree#7440)
fix: Add installer check for python version (inventree#7440)