Repository navigation
Closed
Description
Please verify that this bug has NOT been raised before.
- I checked and didn't find a similar issue
Describe the bug*
After I install the inventree I cannot see the version info running inventree run invoke version
Steps to Reproduce
- I installed wsl on windows. Version is:
Ubuntu 22.04.3 LTS (GNU/Linux 5.15.146.1-microsoft-standard-WSL2 x86_64) - I did sudo apt-get update / sudo apt-get upgrade
- For the below error:
basilisvirus@Zen:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
python3-update-manager update-manager-core
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
I did the two below steps:
4. sudo apt-get install python3-update-manager
5. sudo apt-get install update-manager-core
6. I then installed inventree using sudo wget -qO install.sh https://get.inventree.org && sudo bash install.sh
7. I then run the below command to print Invetree version information and I get "cannot open" error
basilisvirus@Zen:/etc$ sudo inventree run invoke version
/opt/inventree/vendor/pkgr/processes/invoke: 2: .: cannot open env/bin/activate: No such file
Expected behaviour
Expected behavior: when I run inventree run invoke version I want to see the version info.
Deployment Method
- Docker
- Package
- Bare metal
- Other - added info in Steps to Reproduce
Version Information
Cannot copy and paste the inventree version. I still do not know how to run the server of inventree or which is its IP.
Please verify if you can reproduce this bug on the demo site.
- I can reproduce this bug on the demo site.
Relevant log output
No response
Activity
SchrodingersGat commentedon May 26, 2024
@Basilisvirus thanks for reporting - please refer to this discusison on this issue: #7336
We are working on a fix for the installer, apologies for the inconvenience that this bug is causing
matmair commentedon May 27, 2024
@Basilisvirus can you confirm this was resolved by the latest update?
Basilisvirus commentedon Jun 15, 2024
Same issue.
I re-installed wsl, updated ubuntu with sudo apt-get update/upgrade.
Install log:
When I run:
Ubuntu version:
SchrodingersGat commentedon Jun 16, 2024
Quite clearly from your logs:
If the installer cannot correctly auto-detect the python installation to use, you need to provide that information to the installer.
Basilisvirus commentedon Jun 17, 2024
Right.
So to my understanding I need to edit the install.sh in order to provide this information to the installer.
I believe the install.sh is the file that was created when I run the command
sudo wget -qO install.sh https://get.inventree.org && sudo bash install.shwhich installs inventree. So opening up install.sh I cannot find what I would need to change so that I can provide the python installation information.I can see where my python is installed:
But the script might tries to run
which python, which doesn't output any result in my system.matmair commentedon Jun 17, 2024
I have no idea why you think you need to edit the installer.sh but that won't help you either way. The python version gets detected inside of the debian package, the installer is just a shim to select the right release channel - modifications there will not influence which version is used (that happens with in the postinstall script).
Set a enviroment variable named
SETUP_PYTHONto the desired version. I recently added a better error message regarding this in #7440 - curious this is not showing up here.matmair commentedon Jun 17, 2024
The backport of #7440 did not make it into 0.15.x - fix is incoming
SchrodingersGat commentedon Jun 17, 2024
0.15.5 release build has just started, with this fix
Basilisvirus commentedon Jun 22, 2024
I don't have much knowledge on linux. My first though was that "the installer must be doing something wrong because its supposed to be automated or stop at the point where an error occurs".
Anyway, I did:
export SETUP_PYTHON=python3.10and run the auto-installer again, it looks like the issue is solved now.
Then, For uname/Password I uncomment the lines in
/etc/inventree/config.yaml.It looks like under /opt/inventree/contrib/container/.env there are the env variables along with INVENTREE_SITE_URL which if changed will allow other local devices to connect to the local inventree. (https://docs.inventree.org/en/stable/start/config/#basic-options)
I think I figured it all out. Thanks.
Would it make sense to ask for the automatic-installation script to change so that, if No python environment found then it:
SETUP_PYTHONto the desired version and try to run the installation againI could add this suggestion to Issue/Feature Request if you think its appropriate.
EDIT/UPDATE: in another system with wsl where we tried to install inventree, we got an error about systemd not being able to boot in WSL.
Which was solved via
wsl --updateThats all.
You may close this issue then.
SchrodingersGat commentedon Jun 23, 2024
Glad to hear that you got it working. If you can make a suggested improvement for the installer via a new issue / PR, that would be appreciated :)