Skip to content

Installer can't find python environment even though it is installed #7437

Closed

Description

@drendeux

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

  1. Docs used: Installation docs also comment from matmair in this support thread that said to use apt install inventree --reinstall && inventree run web
  2. apt-get update
  3. apt-get upgrade
  4. 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

  1. added
    question
    setup
    triage:not-checked
    on Jun 12, 2024
  2. removed
    triage:not-checked
    on Jun 13, 2024
  3. matmair commented on Jun 13, 2024

    @matmair
    Member

    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

  4. matmair commented on Jun 13, 2024

    @matmair
    Member

    See #7377

  5. added a commit that references this issue on Jun 13, 2024
    f5792f6
  6. added a commit that references this issue on Jun 13, 2024
    5ad6ab3
  7. added a commit that references this issue on Jun 13, 2024
    f1dfced
  8. added a commit that references this issue on Jun 14, 2024
    960c27b
  9. added a commit that references this issue on Jun 24, 2024
    f102085
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    installerquestionsetup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions