inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.13k stars 740 forks source link

Updating bare metal install from 2020 with python below 3.8 #4990

Closed LarryJoy closed 10 months ago

LarryJoy commented 1 year ago

Deployment Method

Describe the problem*

I haven't used InvenTree for three years and I tried to update/reinstall of latest version to my Ubuntu version 20 LTE operating system. I don't know the categories of Deployment Method: Docker, Bare metal, Digital Ocean, etc., so I hope I have checked the correct box. See the Relevant log output below for where I had a problem. What to do?

Steps to Reproduce

Used steps from online information.

Relevant log output

Attempting uninstall: pyyaml
    Found existing installation: PyYAML 5.3.1
ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
wolflu05 commented 1 year ago

Hello @LarryJoy ,

Can you please explain a bit more what commands you run to update and where you got this output, and on which version of inventree you are.

Regarding your deployment method. It's either installer or bare metal. (You should know if you used docker or some external provider like digital ocean).

LarryJoy commented 1 year ago

To try to download the up to date InvenTree program I did the following:I entered 'sudo su' to set up as superuser.This puts me at "/home/larry#".I then invoke 'cd InvenTree-master/inventree', which puts me at "/home/larry/InvenTree-master/inventree#", which is the base directory.I enter 'git pull origin master' and after download I enter 'invoke update'.At the end of the install I get:  Attempting uninstall: pytz     Found existing installation: pytz 2019.3     Uninstalling pytz-2019.3:       Successfully uninstalled pytz-2019.3   Attempting uninstall: urllib3     Found existing installation: urllib3 1.25.8     Uninstalling urllib3-1.25.8:       Successfully uninstalled urllib3-1.25.8   Attempting uninstall: six     Found existing installation: six 1.14.0     Uninstalling six-1.14.0:       Successfully uninstalled six-1.14.0   Attempting uninstall: pyyaml     Found existing installation: PyYAML 5.3.1 ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

I then do/get the @.:/home/larry/InvenTree-master/inventree# source ./inventree-env/bin/activate (inventree-env) @.:/home/larry/InvenTree-master/inventree# cd InvenTree (inventree-env) @.***:/home/larry/InvenTree-master/inventree/InvenTree# python manage.py runserver 127.0.0.1:8000 Traceback (most recent call last):   File "manage.py", line 23, in     execute_from_command_line(sys.argv)   File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/core/management/init.py", line 401, in execute_from_command_line     utility.execute()   File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/core/management/init.py", line 345, in execute     settings.INSTALLED_APPS   File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 76, in getattr     self._setup(name)   File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 63, in _setup     self._wrapped = Settings(settings_module)   File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 142, in init     mod = importlib.import_module(self.SETTINGS_MODULE)   File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module     return _bootstrap._gcd_import(name[level:], package, level)   File "", line 1006, in _gcd_import   File "", line 983, in _find_and_load   File "", line 967, in _find_and_load_unlocked   File "", line 677, in _load_unlocked   File "", line 728, in exec_module   File "", line 219, in _call_with_frames_removed   File "/home/larry/InvenTree-master/inventree/InvenTree/InvenTree/settings.py", line 26, in     from InvenTree.config import get_boolean_setting, get_custom_file, get_setting   File "/home/larry/InvenTree-master/inventree/InvenTree/InvenTree/config.py", line 296     if secret_key := get_setting('INVENTREE_SECRET_KEY', 'secret_key'):                    ^ SyntaxError: invalid syntax

As you can see I don't know what version of inventree I have. Like I said it has been three years since last using the program with an entry date for the parts I was working on of June 2020.--Regards, Larry

On Wednesday, June 7, 2023 at 05:19:28 PM EDT, Lukas ***@***.***> wrote:  

Hello @LarryJoy ,

Can you please explain a bit more what commands you run that you got this output, and on which version of inventree you are.

Regarding your deployment method. It's either installer or bare metal. (You should know if you used docker or some external provider like digital ocean).

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

SchrodingersGat commented 1 year ago

@LarryJoy from that error log there are two things which are apparent:

  1. You need to update your python version - we need python 3.9
  2. You need to install pyyaml - pip install yaml
wolflu05 commented 1 year ago

*CONTRIBUTING.md says python 3.9

SchrodingersGat commented 1 year ago

*CONTRIBUTING.md says python 3.9

Sorry, that was a typo :)

LarryJoy commented 1 year ago

Okay, I got python 3.9 loaded. In fact when I ran 'python3.9 --version' the OS came back with "Python 3.9.17".I am not a programmer and need specific instructions as to what commands to use to install pyyaml - pip install yaml. I tried 'install pyyaml - pip' and the OS came back with "install: missing destination file operand after 'pyyaml - pip'". I also tried 'install yaml' and the OS came back with "install: missing destination file operand after 'yaml'". Do I need to be a superuser or what?

On Thursday, June 8, 2023 at 08:12:03 PM EDT, Oliver ***@***.***> wrote:  

@LarryJoy from that error log there are two things which are apparent:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

SchrodingersGat commented 1 year ago

@LarryJoy run pip install pyyaml - sorry I mistyped the command above

LarryJoy commented 1 year ago

This is what I ran/commanded and what the OS responded with. It looks like the pyyaml is in with the python3 distribution. It's late here and I will check @.***:~$ pip install pyyaml Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (5.3.1)

On Thursday, June 8, 2023 at 11:07:07 PM EDT, Oliver ***@***.***> wrote:  

@LarryJoy run pip install pyyaml - sorry I mistyped the command above

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

LarryJoy commented 1 year ago

Hello Oliver, Still no joy. Here is what I @.:~$ sudo su [sudo] password for larry: @.:/home/larry# cd InvenTree-master/inventree @.:/home/larry/InvenTree-master/inventree# source ./inventree-env/bin/activate (inventree-env) @.:/home/larry/InvenTree-master/inventree# cd InvenTree (inventree-env) @.:/home/larry/InvenTree-master/inventree/InvenTree# python manage.py runserver 127.0.0.1:8000 Traceback (most recent call last):   File "manage.py", line 23, in     execute_from_command_line(sys.argv)   File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/core/management/init.py", line 401, in execute_from_command_line     utility.execute()   File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/core/management/init.py", line 345, in execute     settings.INSTALLED_APPS   File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 76, in getattr     self._setup(name)   File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 63, in _setup     self._wrapped = Settings(settings_module)   File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 142, in init     mod = importlib.import_module(self.SETTINGS_MODULE)   File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module     return _bootstrap._gcd_import(name[level:], package, level)   File "", line 1006, in _gcd_import   File "", line 983, in _find_and_load   File "", line 967, in _find_and_load_unlocked   File "", line 677, in _load_unlocked   File "", line 728, in exec_module   File "", line 219, in _call_with_frames_removed   File "/home/larry/InvenTree-master/inventree/InvenTree/InvenTree/settings.py", line 26, in     from InvenTree.config import get_boolean_setting, get_custom_file, get_setting   File "/home/larry/InvenTree-master/inventree/InvenTree/InvenTree/config.py", line 296     if secret_key := get_setting('INVENTREE_SECRET_KEY', 'secret_key'):                    ^ SyntaxError: invalid syntax (inventree-env) @.:/home/larry/InvenTree-master/inventree/InvenTree# ----- Forwarded Message ----- From: Lawrence Joy @.>To: inventree/InvenTree @.>Sent: Thursday, June 8, 2023 at 11:18:21 PM EDTSubject: Re: [inventree/InvenTree] Uninstall: pyyaml (Issue #4990) This is what I ran/commanded and what the OS responded with. It looks like the pyyaml is in with the python3 distribution. It's late here and I will check @.***:~$ pip install pyyaml Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (5.3.1)

On Thursday, June 8, 2023 at 11:07:07 PM EDT, Oliver ***@***.***> wrote:  

@LarryJoy run pip install pyyaml - sorry I mistyped the command above

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

wolflu05 commented 1 year ago

Can you please format your answers with markdown, it's really hard to read them. (open https://github.com/inventree/InvenTree/issues/4990 with a browser)

Looks like you are using an outdated python version (3.7) required is (3.9). If you say that you already updated it, it's most likely that when you run python it uses the old version, but if you run python3.9 it uses the new. Maybe you can fix this with something like this: https://unix.stackexchange.com/a/498264

wolflu05 commented 1 year ago

Do you have some data that you want to keep? Otherwise I would suggest just starting from scratch. There is now a pretty easy to use installer script. Read more here: https://docs.inventree.org/en/latest/start/installer/

LarryJoy commented 1 year ago

I don't know what is meant by "markdown". I am replying directly on GitHub now. I entered 'python --version' (in my terminal) and the OS came back with "Python 2.7.18". Why is that when I updated to 3.9? So I went to the link you provided https://unix.stackexchange.com/a/498264 and entered the information as stated in that posting--it didn't work! I read through the other postings and this is what finally worked: I entered 'sudo update-alternatives --config python'. The OS came back with "There are 2 choices for the alternative python (providing /usr/bin/python". There were 3 selections 0, 1, and 2. I chose 2 which was "/usr/bin/python3.9", Priority "1", Status "manual mode". Selection 0 and 1 was Priority 9 and Status was stated as "auto mode" for 0 and "manual mode" for 1. I don't know what "auto mode" or "manual mode" means. Now when I enter 'python --version' or 'python -V' the OS comes back with Python 3.9.17. It took me a couple of hours trying the different commands discussed and it looks like the Python 3.9 problem is now fixed.

Uh oh. Yes, I have my inventory data, that I worked on for days/months. I don't know where it is on my OS or how I would back it up. I do a backup of my system almost everyday on a USB drive, so I suspect the inventory data is there somewhere, but I wouldn't know how to find it or how to transfer it in to a new InvenTree install. --Thanks for your help, Larry

matmair commented 1 year ago

@LarryJoy So is the invoke update command working now that you have python 3.9?

LarryJoy commented 1 year ago

NO! The 'invoke update' command did not work. Here I go again as I had written a reply but it emptied when I tried to go somewhere else to get information. This is getting very frustrating. I will not attempt to recreate my commands and what the OS comes back with.

It looks like I will have to do a clean install of the current InvenTree program, according to your "Install" instructions. Do I have to uninstall the three year old program I have before a new install? Or, will the new install overwrite or check my current install?

matmair commented 1 year ago

I can not really answer that without knowing what invoke update returns. In theory that command should be everything you need to run to update or throw errors with what needs to change. But with the little information we have about your installation, it is hard to say. We would need at least the version information to give concrete infos.

Can you look for a file named 'api_version.py' in your install directory and provide us with what is written there as INVENTREE_API_VERSION?

LarryJoy commented 1 year ago

Okay, here we go. First thing is to check what OS I have: larry@larry-MS-7693:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal

Next is to sign on as super user: larry@larry-MS-7693:~$ sudo su [sudo] password for larry: root@larry-MS-7693:/home/larry# This automatically takes me to /home/larry as a super user.

Then I try getting to the InvenjTree program that I had been using back three years ago in June 2020. These are the steps I wrote down back then that worked: root@larry-MS-7693:/home/larry# cd InvenTree-master/inventree root@larry-MS-7693:/home/larry/InvenTree-master/inventree# source ./inventree-env/bin/activate (inventree-env) root@larry-MS-7693:/home/larry/InvenTree-master/inventree# cd InvenTree (inventree-env) root@larry-MS-7693:/home/larry/InvenTree-master/inventree/InvenTree# python manage.py runserver 127.0.0.1:8000 Traceback (most recent call last): File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/core/management/base.py", line 328, in run_from_argv self.execute(*args, cmd_options) File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 60, in execute super().execute(*args, *options) File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/core/management/base.py", line 369, in execute output = self.handle(args, options) File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 67, in handle if not settings.DEBUG and not settings.ALLOWED_HOSTS: File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 76, in getattr self._setup(name) File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 63, in _setup self._wrapped = Settings(settings_module) File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 142, in init mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/home/larry/InvenTree-master/inventree/InvenTree/InvenTree/settings.py", line 25, in from dotenv import load_dotenv ModuleNotFoundError: No module named 'dotenv'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "manage.py", line 23, in execute_from_command_line(sys.argv) File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/core/management/init.py", line 401, in execute_from_command_line utility.execute() File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/core/management/init.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/core/management/base.py", line 341, in run_from_argv connections.close_all() File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/db/utils.py", line 225, in close_all for alias in self: File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/db/utils.py", line 219, in iter return iter(self.databases) File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/utils/functional.py", line 48, in get res = instance.dict[self.name] = self.func(instance) File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/db/utils.py", line 153, in databases self._databases = settings.DATABASES File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 76, in getattr self._setup(name) File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 63, in _setup self._wrapped = Settings(settings_module) File "/home/larry/InvenTree-master/inventree/inventree-env/lib/python3.7/site-packages/django/conf/init.py", line 142, in init mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/home/larry/InvenTree-master/inventree/InvenTree/InvenTree/settings.py", line 25, in from dotenv import load_dotenv ModuleNotFoundError: No module named 'dotenv' (inventree-env) root@larry-MS-7693:/home/larry/InvenTree-master/inventree/InvenTree#

I found that the install directory is "/home/larry/InvenTree-master/inventree/InvenTree/InvenTree". I do an ls (list) command and get the following: larry@larry-MS-7693:~/InvenTree-master/inventree/InvenTree/InvenTree$ ls admin.py ci_render_js.py email.py filters.py helpers.py middleware.py permissions.py sentry.py status_codes.py test_api.py test_urls.py validators.py api.py config.py exceptions.py format.py init.py migrations pycache serializers.py status.py test_middleware.py test_views.py version.py api_version.py. As can be seen the "api_version.py" file is there, so I do a "head" command as follows: larry@larry-MS-7693:~/InvenTree-master/inventree/InvenTree/InvenTree$ head api_version.py """InvenTree API version information."""

InvenTree API version

INVENTREE_API_VERSION = 125

So there it is.

SchrodingersGat commented 1 year ago

You will need to run "invoke update" before starting the server. Please show us the output of the invoke update command.

LarryJoy commented 1 year ago

I am not sure at what directory to do the command "invoke update". Here is what I did: larry@larry-MS-7693:~/InvenTree-master/inventree/InvenTree/InvenTree$ invoke update /usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (2.0.2) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " Traceback (most recent call last): File "/usr/bin/invoke", line 11, in load_entry_point('invoke==1.3.0', 'console_scripts', 'invoke')() File "/usr/lib/python3/dist-packages/invoke/program.py", line 373, in run self.parse_collection() File "/usr/lib/python3/dist-packages/invoke/program.py", line 465, in parse_collection self.load_collection() File "/usr/lib/python3/dist-packages/invoke/program.py", line 696, in load_collection module, parent = loader.load(coll_name) File "/usr/lib/python3/dist-packages/invoke/loader.py", line 76, in load module = imp.load_module(name, fd, path, desc) File "/usr/lib/python3.8/imp.py", line 234, in load_module return load_source(name, filename, file) File "/usr/lib/python3.8/imp.py", line 171, in load_source module = _load(spec) File "", line 702, in _load File "", line 671, in _load_unlocked File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "/home/larry/InvenTree-master/inventree/InvenTree/InvenTree/tasks.py", line 24, in from maintenance_mode.core import (get_maintenance_mode, maintenance_mode_on, ModuleNotFoundError: No module named 'maintenance_mode'

LarryJoy commented 1 year ago

I tried this: larry@larry-MS-7693:~/InvenTree-master/inventree/InvenTree$ invoke update Installing required python packages from 'requirements.txt' Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: pip in /usr/local/lib/python3.8/dist-packages (23.1.2) Defaulting to user installation because normal site-packages is not writeable ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'

SchrodingersGat commented 1 year ago

@LarryJoy the "invoke" command must be run from the top-level directory, where the tasks.py file is located.

Please run ls to ensure you are in the directory which contains tasks.py

matmair commented 1 year ago

It also seems like you still have an old venv around - please destroy it and create a new one. The old one (/home/larry/InvenTree-master/inventree/inventree-env) still points to python 3.7 - you need at least 3.9 to run 0.11.x.

LarryJoy commented 1 year ago

Okay, the top-level directory is shown by: root@larry-MS-7693:/home/larry/InvenTree-master/inventree# ls backportrc.json CONTRIBUTING.md docker Dockerfile InvenTree inventree_static package-lock.json README.md requirements-dev.in requirements.txt setup.cfg ci crowdin.yml docker-compose.yml docs inventree_default_db.sqlite3 LICENSE Procfile readthedocs.yml requirements-dev.txt runtime.txt tasks.py contrib deploy docker.dev.env images inventree-env package.json pycache RELEASE.md requirements.in SECURITY.md

So, I am in the correct directory that has the tasks.py file. So here I go: root@larry-MS-7693:/home/larry/InvenTree-master/inventree# invoke update Installing required python packages from 'requirements.txt' Requirement already satisfied: pip in /usr/local/lib/python3.8/dist-packages (23.1.2) 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 There are too many lines of code to copy and paste here. The output ends with the following (as before): Attempting uninstall: pyyaml Found existing installation: PyYAML 5.3.1 ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

I went to "/home/larry/InvenTree-master/inventree/inventree-env" as you indicated and got the following: root@larry-MS-7693:/home/larry/InvenTree-master/inventree/inventree-env# ls -l total 20 drwxrwxr-x 3 larry larry 4096 Dec 29 2020 bin drwxrwxr-x 2 larry larry 4096 Oct 12 2020 include drwxrwxr-x 3 larry larry 4096 Oct 12 2020 lib lrwxrwxrwx 1 larry larry 3 Oct 12 2020 lib64 -> lib -rw-rw-r-- 1 larry larry 69 Oct 12 2020 pyvenv.cfg drwxrwxr-x 3 larry larry 4096 Oct 12 2020 share I am sorry, but you will have to give me explicit directions/commands as to what to destroy/delete and how/what to enter to create a new one.

matmair commented 1 year ago

You have to:

LarryJoy commented 1 year ago

Okay, here are the commands I entered and the OS postings: larry@larry-MS-7693:~$ cd /home/larry/InvenTree-master/inventree/inventree-env larry@larry-MS-7693:~/InvenTree-master/inventree/inventree-env$ ls bin include lib lib64 pyvenv.cfg share larry@larry-MS-7693:~/InvenTree-master/inventree/inventree-env$ sudo rm -rf venv [sudo] password for larry: larry@larry-MS-7693:~/InvenTree-master/inventree/inventree-env$ ls bin include lib lib64 pyvenv.cfg share larry@larry-MS-7693:~/InvenTree-master/inventree/inventree-env$ python3 -m venv env larry@larry-MS-7693:~/InvenTree-master/inventree/inventree-env$ source ./env/bin/activate (env) larry@larry-MS-7693:~/InvenTree-master/inventree/inventree-env$ pip install -U -r src/requirements.txt ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'src/requirements.txt' (env) larry@larry-MS-7693:~/InvenTree-master/inventree/inventree-env$

I went no further because of the error.

matmair commented 1 year ago

You are one level too deep. The venv is the folder you changed into. You have to delete /home/larry/InvenTree-master/inventree/inventree-envand execute the rest of the commands from /home/larry/InvenTree-master/inventree. I am really hesitant to give you just copy-paste commands as there is a good chance that your instance is not fully following the setup guide and that commands will not work for anyone else who might stumble over this issue. I can not recollect us advising the name inventree-env for the venv and not env.

I would suggest reading up on python and virtual environments if you want to continue using a bare metal instance after we get over this problem. The installer install is probably easier if you are not regularly administering python apps on linux.

LarryJoy commented 1 year ago

I backed off one level as you indicated and did the same commands and this is what I got: larry@larry-MS-7693:~$ cd /home/larry/InvenTree-master/inventree larry@larry-MS-7693:~/InvenTree-master/inventree$ ls backportrc.json CONTRIBUTING.md docker Dockerfile InvenTree inventree_static package-lock.json README.md requirements-dev.in requirements.txt setup.cfg ci crowdin.yml docker-compose.yml docs inventree_default_db.sqlite3 LICENSE Procfile readthedocs.yml requirements-dev.txt runtime.txt tasks.py contrib deploy docker.dev.env images inventree-env package.json pycache RELEASE.md requirements.in SECURITY.md larry@larry-MS-7693:~/InvenTree-master/inventree$ sudo rm -rf venv [sudo] password for larry: larry@larry-MS-7693:~/InvenTree-master/inventree$ ls backportrc.json CONTRIBUTING.md docker Dockerfile InvenTree inventree_static package-lock.json README.md requirements-dev.in requirements.txt setup.cfg ci crowdin.yml docker-compose.yml docs inventree_default_db.sqlite3 LICENSE Procfile readthedocs.yml requirements-dev.txt runtime.txt tasks.py contrib deploy docker.dev.env images inventree-env package.json pycache RELEASE.md requirements.in SECURITY.md larry@larry-MS-7693:~/InvenTree-master/inventree$ python3 -m venv env larry@larry-MS-7693:~/InvenTree-master/inventree$ source ./env/bin/activate (env) larry@larry-MS-7693:~/InvenTree-master/inventree$ ls backportrc.json CONTRIBUTING.md docker Dockerfile images inventree-env package.json pycache RELEASE.md requirements.in SECURITY.md ci crowdin.yml docker-compose.yml docs InvenTree inventree_static package-lock.json README.md requirements-dev.in requirements.txt setup.cfg contrib deploy docker.dev.env env inventree_default_db.sqlite3 LICENSE Procfile readthedocs.yml requirements-dev.txt runtime.txt tasks.py (env) larry@larry-MS-7693:~/InvenTree-master/inventree$ pip install -U -r src/requirements.txt ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'src/requirements.txt'

As you can see I got the same Errno 2 "No such file or directory: 'src/requirements.txt'". Two comments:

  1. I don't know where the line out lines are coming from. I am just doing a select with the cursor, RMB copy, and then in this posting doing an RMB and paste. There must be hidden commands in the text, which I don't know about.
  2. When I originally downloaded the InvenTree program in early 2020 or late 2019 I just followed the instructions that were on line. I didn't do anything on my own. As I said before, I am not a programmer or software engineer. ***What next?
wolflu05 commented 1 year ago

I can partially answer your latest comment:

I don't know where the line out lines are coming from. I am just doing a select with the cursor, RMB copy, and then in this posting doing an RMB and paste. There must be hidden commands in the text, which I don't know about.

It's related to one of my earlier comments:

Can you please format your answers with markdown, it's really hard to read them. (open #4990 with a browser)

I don't know what is meant by "markdown".

Markdown is a formatting language. Your copied text contains some markdown commands. Like ~ which is used for crossing out text like this (~~this~~). What I meant earlier was that you should use code blocks for your copied text. (Three ` at the beginning and three at the end (with newlines). You can read more about markdown here.

LarryJoy commented 1 year ago

wolflu05, The link you gave for markdown was in the German language. I did an internet search on "markdown" and found the information (in English). Here are my terminal commands and results using markdown:

larry@larry-MS-7693:~$ cd /home/larry/InvenTree-master/inventree
larry@larry-MS-7693:~/InvenTree-master/inventree$ ls
backportrc.json  CONTRIBUTING.md  docker              Dockerfile  images                        inventree-env     package.json       __pycache__      RELEASE.md            requirements.in   SECURITY.md
ci               crowdin.yml      docker-compose.yml  docs        InvenTree                     inventree_static  package-lock.json  README.md        requirements-dev.in   requirements.txt  setup.cfg
contrib          deploy           docker.dev.env      env         inventree_default_db.sqlite3  LICENSE           Procfile           readthedocs.yml  requirements-dev.txt  runtime.txt       tasks.py
larry@larry-MS-7693:~/InvenTree-master/inventree$ sudo rm -rf venv
[sudo] password for larry: 
larry@larry-MS-7693:~/InvenTree-master/inventree$ ls
backportrc.json  CONTRIBUTING.md  docker              Dockerfile  images                        inventree-env     package.json       __pycache__      RELEASE.md            requirements.in   SECURITY.md
ci               crowdin.yml      docker-compose.yml  docs        InvenTree                     inventree_static  package-lock.json  README.md        requirements-dev.in   requirements.txt  setup.cfg
contrib          deploy           docker.dev.env      env         inventree_default_db.sqlite3  LICENSE           Procfile           readthedocs.yml  requirements-dev.txt  runtime.txt       tasks.py
larry@larry-MS-7693:~/InvenTree-master/inventree$ sudo rm -rf inventree-env
larry@larry-MS-7693:~/InvenTree-master/inventree$ ls
backportrc.json  CONTRIBUTING.md  docker              Dockerfile  images                        inventree_static  package-lock.json  README.md        requirements-dev.in   requirements.txt  setup.cfg
ci               crowdin.yml      docker-compose.yml  docs        InvenTree                     LICENSE           Procfile           readthedocs.yml  requirements-dev.txt  runtime.txt       tasks.py
contrib          deploy           docker.dev.env      env         inventree_default_db.sqlite3  package.json      __pycache__        RELEASE.md       requirements.in       SECURITY.md
larry@larry-MS-7693:~/InvenTree-master/inventree$ python3 -m venv env
larry@larry-MS-7693:~/InvenTree-master/inventree$ source ./env/bin/activate
(env) larry@larry-MS-7693:~/InvenTree-master/inventree$ ls
backportrc.json  CONTRIBUTING.md  docker              Dockerfile  images                        inventree_static  package-lock.json  README.md        requirements-dev.in   requirements.txt  setup.cfg
ci               crowdin.yml      docker-compose.yml  docs        InvenTree                     LICENSE           Procfile           readthedocs.yml  requirements-dev.txt  runtime.txt       tasks.py
contrib          deploy           docker.dev.env      env         inventree_default_db.sqlite3  package.json      __pycache__        RELEASE.md       requirements.in       SECURITY.md
(env) larry@larry-MS-7693:~/InvenTree-master/inventree$ pip install -U -r src/requirements.txt
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'src/requirements.txt'
(env) larry@larry-MS-7693:~/InvenTree-master/inventree$ 

Hopefully you can read this and can can help me go forward with whatever terminal commands I need to do in order to get my InvenTree program back on its feet.

matmair commented 1 year ago

@LarryJoy try running

cd ~/InvenTree-master/inventree
source ./env/bin/activate
pip install -U -r requirements.txt
LarryJoy commented 1 year ago

Thanks again for the further commands but here is what I got. This after many, many lines of output:

Building wheels for collected packages: django-allauth, django-xforwardedfor-middleware, markuppy, sgmllib3k
  Building wheel for django-allauth (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/larry/InvenTree-master/inventree/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lrt82v8k/django-allauth/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lrt82v8k/django-allauth/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-n6or5dbe
       cwd: /tmp/pip-install-lrt82v8k/django-allauth/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for django-allauth
  Running setup.py clean for django-allauth
  Building wheel for django-xforwardedfor-middleware (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/larry/InvenTree-master/inventree/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lrt82v8k/django-xforwardedfor-middleware/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lrt82v8k/django-xforwardedfor-middleware/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-7ehdwqyv
       cwd: /tmp/pip-install-lrt82v8k/django-xforwardedfor-middleware/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for django-xforwardedfor-middleware
  Running setup.py clean for django-xforwardedfor-middleware
  Building wheel for markuppy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/larry/InvenTree-master/inventree/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lrt82v8k/markuppy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lrt82v8k/markuppy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-q4o7w4rf
       cwd: /tmp/pip-install-lrt82v8k/markuppy/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for markuppy
  Running setup.py clean for markuppy
  Building wheel for sgmllib3k (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/larry/InvenTree-master/inventree/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lrt82v8k/sgmllib3k/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lrt82v8k/sgmllib3k/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-cztc5vu5
       cwd: /tmp/pip-install-lrt82v8k/sgmllib3k/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for sgmllib3k
  Running setup.py clean for sgmllib3k
Failed to build django-allauth django-xforwardedfor-middleware markuppy sgmllib3k
Installing collected packages: six, python-dateutil, arrow, typing-extensions, asgiref, attrs, pytz, babel, webencodings, tinycss2, bleach, wcwidth, blessed, brotli, certifi, pycparser, cffi, charset-normalizer, itypes, uritemplate, idna, urllib3, requests, markupsafe, jinja2, coreschema, coreapi, cryptography, cssselect2, defusedxml, diff-match-patch, sqlparse, django, pyjwt, python3-openid, oauthlib, requests-oauthlib, django-allauth, pypng, pillow, qrcode, django-otp, django-allauth-2fa, django-cleanup, django-cors-headers, django-crispy-forms, django-dbbackup, django-error-report, django-filter, django-flags, django-formtools, backports.zoneinfo, icalendar, django-recurrence, django-ical, markuppy, odfpy, xlrd, xlwt, et-xmlfile, openpyxl, pyyaml, tablib, django-import-export, django-js-asset, python-fsutil, django-maintenance-mode, zipp, importlib-metadata, markdown, django-markdownify, py-moneyed, django-money, django-mptt, django-picklefield, redis, django-q, sentry-sdk, django-q-sentry, django-redis, django-sql-utils, django-sslserver, django-stdimage, django-taggit, django-user-sessions, pyphen, html5lib, pydyf, zopfli, fonttools, weasyprint, django-weasyprint, django-xforwardedfor-middleware, djangorestframework, pkgutil-resolve-name, importlib-resources, pyrsistent, jsonschema, inflection, drf-spectacular, dulwich, sgmllib3k, feedparser, gunicorn, pdf2image, pint, python-barcode, python-dotenv, rapidfuzz, regex
    Running setup.py install for django-allauth ... done
    Running setup.py install for markuppy ... done
    Running setup.py install for django-xforwardedfor-middleware ... done
    Running setup.py install for sgmllib3k ... done
Successfully installed arrow-1.2.3 asgiref-3.7.2 attrs-23.1.0 babel-2.12.1 backports.zoneinfo-0.2.1 bleach-6.0.0 blessed-1.20.0 brotli-1.0.9 certifi-2023.5.7 cffi-1.15.1 charset-normalizer-3.1.0 coreapi-2.3.3 coreschema-0.0.4 cryptography-41.0.1 cssselect2-0.7.0 defusedxml-0.7.1 diff-match-patch-20230430 django-3.2.19 django-allauth-0.54.0 django-allauth-2fa-0.10.0 django-cleanup-7.0.0 django-cors-headers-4.0.0 django-crispy-forms-1.14.0 django-dbbackup-4.0.2 django-error-report-0.2.0 django-filter-23.2 django-flags-5.0.12 django-formtools-2.4.1 django-ical-1.9.1 django-import-export-2.5.0 django-js-asset-2.0.0 django-maintenance-mode-0.18.0 django-markdownify-0.9.3 django-money-2.1.1 django-mptt-0.11.0 django-otp-1.2.1 django-picklefield-3.1 django-q-1.3.9 django-q-sentry-0.1.6 django-recurrence-1.11.1 django-redis-5.2.0 django-sql-utils-0.6.1 django-sslserver-0.22 django-stdimage-5.3.0 django-taggit-4.0.0 django-user-sessions-2.0.0 django-weasyprint-2.2.0 django-xforwardedfor-middleware-2.0 djangorestframework-3.14.0 drf-spectacular-0.26.2 dulwich-0.21.5 et-xmlfile-1.1.0 feedparser-6.0.10 fonttools-4.39.4 gunicorn-20.1.0 html5lib-1.1 icalendar-5.0.7 idna-3.4 importlib-metadata-6.6.0 importlib-resources-5.12.0 inflection-0.5.1 itypes-1.2.0 jinja2-3.1.2 jsonschema-4.17.3 markdown-3.4.3 markuppy-1.14 markupsafe-2.1.3 oauthlib-3.2.2 odfpy-1.4.1 openpyxl-3.1.2 pdf2image-1.16.3 pillow-9.5.0 pint-0.21 pkgutil-resolve-name-1.3.10 py-moneyed-1.2 pycparser-2.21 pydyf-0.6.0 pyjwt-2.7.0 pyphen-0.14.0 pypng-0.20220715.0 pyrsistent-0.19.3 python-barcode-0.14.0 python-dateutil-2.8.2 python-dotenv-1.0.0 python-fsutil-0.10.0 python3-openid-3.2.0 pytz-2023.3 pyyaml-6.0 qrcode-7.4.2 rapidfuzz-0.7.6 redis-3.5.3 regex-2023.5.5 requests-2.31.0 requests-oauthlib-1.3.1 sentry-sdk-1.25.0 sgmllib3k-1.0.0 six-1.16.0 sqlparse-0.4.4 tablib-3.4.0 tinycss2-1.1.1 typing-extensions-4.6.3 uritemplate-4.1.1 urllib3-2.0.2 wcwidth-0.2.6 weasyprint-54.3 webencodings-0.5.1 xlrd-2.0.1 xlwt-1.3.0 zipp-3.15.0 zopfli-0.2.2
(env) larry@larry-MS-7693:~/InvenTree-master/inventree$ 

Lots of errors and on my screen they are in red.

matmair commented 1 year ago

A 10-second google search for error: invalid command 'bdist_wheel' would be faster for both of us but here you go:

cd ~/InvenTree-master/inventree
source ./env/bin/activate
pip install wheel
pip install -U -r requirements.txt
LarryJoy commented 1 year ago

Okay I executed those four lines of terminal commands and all looks good. Then I tried the next command of 'invoke update' and this is what I got:

(env) root@larry-MS-7693:/home/larry/InvenTree-master/inventree# invoke update
Installing required python packages from 'requirements.txt'
Collecting pip
  Using cached pip-23.1.2-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
Successfully installed pip-23.1.2
Requirement already satisfied: arrow==1.2.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 7)) (1.2.3)
Requirement already satisfied: asgiref==3.7.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 9)) (3.7.2)
Requirement already satisfied: attrs==23.1.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 11)) (23.1.0)
Requirement already satisfied: babel==2.12.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 13)) (2.12.1)
Requirement already satisfied: bleach[css]==6.0.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 15)) (6.0.0)
Requirement already satisfied: blessed==1.20.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 17)) (1.20.0)
Requirement already satisfied: brotli==1.0.9 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 19)) (1.0.9)
Requirement already satisfied: certifi==2023.5.7 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 21)) (2023.5.7)
Requirement already satisfied: cffi==1.15.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 25)) (1.15.1)
Requirement already satisfied: charset-normalizer==3.1.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 29)) (3.1.0)
Requirement already satisfied: coreapi==2.3.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 31)) (2.3.3)
Requirement already satisfied: coreschema==0.0.4 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 33)) (0.0.4)
Requirement already satisfied: cryptography==41.0.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 35)) (41.0.1)
Requirement already satisfied: cssselect2==0.7.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 39)) (0.7.0)
Requirement already satisfied: defusedxml==0.7.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 41)) (0.7.1)
Requirement already satisfied: diff-match-patch==20230430 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 45)) (20230430)
Requirement already satisfied: django==3.2.19 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 47)) (3.2.19)
Requirement already satisfied: django-allauth==0.54.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 78)) (0.54.0)
Requirement already satisfied: django-allauth-2fa==0.10.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 82)) (0.10.0)
Requirement already satisfied: django-cleanup==7.0.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 84)) (7.0.0)
Requirement already satisfied: django-cors-headers==4.0.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 86)) (4.0.0)
Requirement already satisfied: django-crispy-forms==1.14.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 88)) (1.14.0)
Requirement already satisfied: django-dbbackup==4.0.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 90)) (4.0.2)
Requirement already satisfied: django-error-report==0.2.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 92)) (0.2.0)
Requirement already satisfied: django-filter==23.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 94)) (23.2)
Requirement already satisfied: django-flags==5.0.12 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 96)) (5.0.12)
Requirement already satisfied: django-formtools==2.4.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 98)) (2.4.1)
Requirement already satisfied: django-ical==1.9.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 100)) (1.9.1)
Requirement already satisfied: django-import-export==2.5.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 102)) (2.5.0)
Requirement already satisfied: django-js-asset==2.0.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 104)) (2.0.0)
Requirement already satisfied: django-maintenance-mode==0.18.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 106)) (0.18.0)
Requirement already satisfied: django-markdownify==0.9.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 108)) (0.9.3)
Requirement already satisfied: django-money==2.1.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 110)) (2.1.1)
Requirement already satisfied: django-mptt==0.11.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 112)) (0.11.0)
Requirement already satisfied: django-otp==1.2.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 114)) (1.2.1)
Requirement already satisfied: django-picklefield==3.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 116)) (3.1)
Requirement already satisfied: django-q==1.3.9 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 118)) (1.3.9)
Requirement already satisfied: django-q-sentry==0.1.6 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 120)) (0.1.6)
Requirement already satisfied: django-recurrence==1.11.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 122)) (1.11.1)
Requirement already satisfied: django-redis==5.2.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 124)) (5.2.0)
Requirement already satisfied: django-sql-utils==0.6.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 126)) (0.6.1)
Requirement already satisfied: django-sslserver==0.22 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 128)) (0.22)
Requirement already satisfied: django-stdimage==5.3.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 130)) (5.3.0)
Requirement already satisfied: django-taggit==4.0.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 132)) (4.0.0)
Requirement already satisfied: django-user-sessions==2.0.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 134)) (2.0.0)
Requirement already satisfied: django-weasyprint==2.2.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 136)) (2.2.0)
Requirement already satisfied: django-xforwardedfor-middleware==2.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 138)) (2.0)
Requirement already satisfied: djangorestframework==3.14.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 140)) (3.14.0)
Requirement already satisfied: drf-spectacular==0.26.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 144)) (0.26.2)
Requirement already satisfied: dulwich==0.21.5 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 146)) (0.21.5)
Requirement already satisfied: et-xmlfile==1.1.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 148)) (1.1.0)
Requirement already satisfied: feedparser==6.0.10 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 150)) (6.0.10)
Requirement already satisfied: fonttools[woff]==4.39.4 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 152)) (4.39.4)
Requirement already satisfied: gunicorn==20.1.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 154)) (20.1.0)
Requirement already satisfied: html5lib==1.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 156)) (1.1)
Requirement already satisfied: icalendar==5.0.7 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 158)) (5.0.7)
Requirement already satisfied: idna==3.4 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 160)) (3.4)
Requirement already satisfied: importlib-metadata==6.6.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 162)) (6.6.0)
Requirement already satisfied: inflection==0.5.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 164)) (0.5.1)
Requirement already satisfied: itypes==1.2.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 166)) (1.2.0)
Requirement already satisfied: jinja2==3.1.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 168)) (3.1.2)
Requirement already satisfied: jsonschema==4.17.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 170)) (4.17.3)
Requirement already satisfied: markdown==3.4.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 172)) (3.4.3)
Requirement already satisfied: markuppy==1.14 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 174)) (1.14)
Requirement already satisfied: markupsafe==2.1.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 176)) (2.1.3)
Requirement already satisfied: oauthlib==3.2.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 178)) (3.2.2)
Requirement already satisfied: odfpy==1.4.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 180)) (1.4.1)
Requirement already satisfied: openpyxl==3.1.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 182)) (3.1.2)
Requirement already satisfied: pdf2image==1.16.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 184)) (1.16.3)
Requirement already satisfied: pillow==9.5.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 186)) (9.5.0)
Requirement already satisfied: pint==0.21 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 194)) (0.21)
Requirement already satisfied: py-moneyed==1.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 196)) (1.2)
Requirement already satisfied: pycparser==2.21 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 200)) (2.21)
Requirement already satisfied: pydyf==0.6.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 202)) (0.6.0)
Requirement already satisfied: pyjwt[crypto]==2.7.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 204)) (2.7.0)
Requirement already satisfied: pyphen==0.14.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 206)) (0.14.0)
Requirement already satisfied: pypng==0.20220715.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 208)) (0.20220715.0)
Requirement already satisfied: pyrsistent==0.19.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 210)) (0.19.3)
Requirement already satisfied: python-barcode[images]==0.14.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 212)) (0.14.0)
Requirement already satisfied: python-dateutil==2.8.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 214)) (2.8.2)
Requirement already satisfied: python-dotenv==1.0.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 219)) (1.0.0)
Requirement already satisfied: python-fsutil==0.10.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 221)) (0.10.0)
Requirement already satisfied: python3-openid==3.2.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 223)) (3.2.0)
Requirement already satisfied: pytz==2023.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 225)) (2023.3)
Requirement already satisfied: pyyaml==6.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 231)) (6.0)
Requirement already satisfied: qrcode[pil]==7.4.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 235)) (7.4.2)
Requirement already satisfied: rapidfuzz==0.7.6 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 239)) (0.7.6)
Requirement already satisfied: redis==3.5.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 241)) (3.5.3)
Requirement already satisfied: regex==2023.5.5 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 245)) (2023.5.5)
Requirement already satisfied: requests==2.31.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 247)) (2.31.0)
Requirement already satisfied: requests-oauthlib==1.3.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 252)) (1.3.1)
Requirement already satisfied: sentry-sdk==1.25.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 254)) (1.25.0)
Requirement already satisfied: sgmllib3k==1.0.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 258)) (1.0.0)
Requirement already satisfied: six==1.16.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 260)) (1.16.0)
Requirement already satisfied: sqlparse==0.4.4 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 266)) (0.4.4)
Requirement already satisfied: tablib[html,ods,xls,xlsx,yaml]==3.4.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 270)) (3.4.0)
Requirement already satisfied: tinycss2==1.1.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 274)) (1.1.1)
Requirement already satisfied: typing-extensions==4.6.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 279)) (4.6.3)
Requirement already satisfied: uritemplate==4.1.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 283)) (4.1.1)
Requirement already satisfied: urllib3==2.0.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 287)) (2.0.2)
Requirement already satisfied: wcwidth==0.2.6 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 292)) (0.2.6)
Requirement already satisfied: weasyprint==54.3 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 294)) (54.3)
Requirement already satisfied: webencodings==0.5.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 298)) (0.5.1)
Requirement already satisfied: xlrd==2.0.1 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 304)) (2.0.1)
Requirement already satisfied: xlwt==1.3.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 306)) (1.3.0)
Requirement already satisfied: zipp==3.15.0 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 308)) (3.15.0)
Requirement already satisfied: zopfli==0.2.2 in ./env/lib/python3.8/site-packages (from -r requirements.txt (line 310)) (0.2.2)
Requirement already satisfied: setuptools in ./env/lib/python3.8/site-packages (from django-money==2.1.1->-r requirements.txt (line 110)) (44.0.0)
Requirement already satisfied: backports.zoneinfo in ./env/lib/python3.8/site-packages (from icalendar==5.0.7->-r requirements.txt (line 158)) (0.2.1)
Requirement already satisfied: importlib-resources>=1.4.0 in ./env/lib/python3.8/site-packages (from jsonschema==4.17.3->-r requirements.txt (line 170)) (5.12.0)
Requirement already satisfied: pkgutil-resolve-name>=1.3.10 in ./env/lib/python3.8/site-packages (from jsonschema==4.17.3->-r requirements.txt (line 170)) (1.3.10)
Backing up InvenTree database...
Traceback (most recent call last):
  File "manage.py", line 23, in <module>
    execute_from_command_line(sys.argv)
  File "/home/larry/InvenTree-master/inventree/env/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/larry/InvenTree-master/inventree/env/lib/python3.8/site-packages/django/core/management/__init__.py", line 363, in execute
    settings.INSTALLED_APPS
  File "/home/larry/InvenTree-master/inventree/env/lib/python3.8/site-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/home/larry/InvenTree-master/inventree/env/lib/python3.8/site-packages/django/conf/__init__.py", line 69, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/larry/InvenTree-master/inventree/env/lib/python3.8/site-packages/django/conf/__init__.py", line 170, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/larry/InvenTree-master/inventree/InvenTree/InvenTree/settings.py", line 186, in <module>
    'location': config.get_backup_dir(),
  File "/home/larry/InvenTree-master/inventree/InvenTree/InvenTree/config.py", line 246, in get_backup_dir
    raise FileNotFoundError('INVENTREE_BACKUP_DIR not specified')
FileNotFoundError: INVENTREE_BACKUP_DIR not specified
(env) root@larry-MS-7693:/home/larry/InvenTree-master/inventree# 

And so the next step/command?

SchrodingersGat commented 1 year ago

You will need to set the INVENTREE_BACKUP_DIR parameter in your settings file, or environment variables:

https://docs.inventree.org/en/latest/start/config/#backup-file-storage

LarryJoy commented 1 year ago

You got me there! I used "locate" and "find" to try to locate "settings" file or "environment variables". I did find "config.py" and some other "config...", but nothing of an INVENTREE_BACKUP_DIR directory or file. Where do I find what I need? And is there some hint as to where/what this backup directory/file should be named?

matmair commented 1 year ago

Please read the documentation around the configuration of InvenTree, your questions are answered there.

LarryJoy commented 1 year ago

matmair, Okay on the documentation. It will take me awhile to read, study, and absorb the information and then attempt to understand the configuration I have and any defects. I only want to use the InvenTree program for what it is for, an inventory database, not have to do any programming. It would seem that these days you could use artificial intelligence (AI) to do the setup automatically, checking the directories and files to see if they are up to date and deleting anything that is not needed, besides keeping the inventory already created. --Regards, Larry Joy

github-actions[bot] commented 1 year ago

This issue seems stale. Please react to show this is still important.

LarryJoy commented 1 year ago

I had composed an e-mail reply yesterday but did not get around to sending it. Here then is my comment. I have read through the info you gave me the link to but it has not helped. The info is clear as mud or as the person who said that they knew any language there was, except for the Greek language, and was asked about a particular language, the person replied with, "I don't know, it's all Greek to me."

I have used the "search" and "find" terminal commands and then used the "tree" command to see the architecture of the directories, files, sub-directories and files, but not knowing what should and should not be there it does me no good.

I need someone to hold my hand, look over my shoulder, execute what I am told, interpret the results (mostly error messages), and then what to do next.

I believe my only recourse is to do a brand new download of your up-to-date program, what you call bare metal, to a new directory. This I would do after updating my Ubuntu OS from 20.4 to 22.4. This is another battle I am going to have to contend with as the automatic update message, that I answer yes to, does nothing. This will mean a lot of redundant work to recreate the data that I have already entered. I have just over 100 items in my inventory and at this point this is just a hobby. --Regards, Larry

github-actions[bot] commented 10 months ago

This issue seems stale. Please react to show this is still important.

LarryJoy commented 10 months ago

This is just too convoluted for me. As mentioned before once I get my Ubuntu OS updated I will do a brand new download of InvenTree into a separate/new directory and recreate my database. This will take me months, maybe even years.