ParisNeo / lollms-webui

Lord of Large Language Models Web User Interface
https://lollms.com
Apache License 2.0
4.35k stars 551 forks source link

Automatic install does not work, ./linux_run.sh gives error #514

Open d13g4 opened 7 months ago

d13g4 commented 7 months ago

Expected Behavior

Automatic install and starting with linux_run.sh

Current Behavior

Error

Steps to Reproduce

  1. run linux_install.sh
  2. run linux_run.sh

Context

Fresh automated install after 9.4 realease.

Screenshots

23:39:19 diemo@ai-server /home/diemo/lollms_autoinstall
$ ./linux_run.sh
Starting LOLLMS Web UI...


 /\__\     /\  \         /\__\     /\__\     /\__\         /\  \                                                                                                                         
/:/  /    /::\  \       /:/  /    /:/  /    /::|  |       /::\  \                         

/:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \
/:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|| \:\~\ \ \
/:// /:// \:_
\ /:// /:// /:/ |::::_\ /\ \:\ \ _\
\:\ \ \:\ \ /:/ / \:\ \ \:\ \ \//~~/:/ / \:\ \:\ \//
\:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:_\
\:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ /
\:_
\ \::/ / \:_\ \:_\ /:/ / \::/ /
\// \// \// \// \// \//
By ParisNeo
WARNING conda.exception_handler:print_unexpected_error_report(168): KeyError('active_prefix_name')
Traceback (most recent call last):

File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/exception_handler.py", line 17, in call
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/cli/main.py", line 110, in main_sourced
print(activator.execute(), end="")
^^^^^^^^^^^^^^^^^^^
File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 203, in execute
return getattr(self, self.command)()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 168, in activate
builder_result = self.build_activate(self.env_name_or_prefix)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 346, in build_activate
return self._build_activate_stack(env_name_or_prefix, False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 375, in _build_activate_stack
conda_prompt_modifier = self._prompt_modifier(prefix, conda_default_env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 704, in _prompt_modifier
old_shlvl = int(self.environ.get("CONDA_SHLVL", "0").rstrip())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/exception_handler.py", line 165, in print_unexpected_error_report
get_main_info_str(error_report["conda_info"])
File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/cli/main_info.py", line 442, in get_main_info_str
return "\n".join(("", (f"{key:>23} : {value}" for key, value in builder()), ""))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/cli/main_info.py", line 442, in
return "\n".join(("",
(f"{key:>23} : {value}" for key, value in builder()), ""))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/cli/main_info.py", line 402, in builder
if info_dict["active_prefix_name"]:


KeyError: 'active_prefix_name'                                                                

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<                                  

    Traceback (most recent call last):                                                                                                                                                       
      File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/exception_handler.py", line 17, in __call__                                         
        return func(*args, **kwargs)     

      File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/cli/main.py", line 110, in main_sourced                                    
        print(activator.execute(), end="")
              ^^^^^^^^^^^^^^^^^^^
      File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 203, in execute 
        return getattr(self, self.command)()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 168, in activate
        builder_result = self.build_activate(self.env_name_or_prefix)                         
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                         
      File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 346, in build_activate
        return self._build_activate_stack(env_name_or_prefix, False)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 375, in _build_activate_stack
        conda_prompt_modifier = self._prompt_modifier(prefix, conda_default_env)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/diemo/lollms_autoinstall/installer_files/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 704, in _prompt_modifier 
        old_shlvl = int(self.environ.get("CONDA_SHLVL", "0").rstrip())      
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      
    ValueError: invalid literal for int() with base 10: ''                                                                                                                                   

`$ /home/diemo/lollms_autoinstall/installer_files/miniconda3/bin/conda shell.posix activate ./installer_files/lollms_env`                                                                    

  environment variables:                       
conda info could not be constructed.                                                          
KeyError('active_prefix_name')                 

An unexpected error has occurred. Conda has prepared the above report.                                                                                                                       
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.                                                                                                                                  

Example: conda --no-plugins install <package>                                                 

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on              
the command line to run the command without plugins enabled.                   

Example: CONDA_NO_PLUGINS=true conda install <package>                                        

Timeout reached. No report sent.               

Traceback (most recent call last):             
  File "/home/diemo/lollms_autoinstall/lollms-webui/app.py", line 12, in <module>             
    from lollms.app import LollmsApplication                                                                                                                                                 
ModuleNotFoundError: No module named 'lollms'
Press Enter to exit...    
Brian01 commented 7 months ago

I've never responded to anything on here, so please forgive me if I'm ignorant of the standards regarding responses to these issues.

@d13g4

Have you tried editing linux_run.sh with CONDA_SHLVL="0" instead of the originally empty quotes from the template?

Have you tried replacing the relative directory references in linux_run.sh with absolute references you've verified exist? ex: /home/diemo/lollms_autoinstall/installer_files instead of ./installer_files

I don't have much experience with all this stuff, but that's probably where I'd start if I saw those errors.

ParisNeo commented 7 months ago

Hi, it looks like a conda problem. To be honest, I have only a windows PC to test. So most of linux testing is done by people who report the issues. I'll try to take a look next weekend if I have time.

phatgeek commented 6 months ago

@Brian01 I was having similar (but not identical) issues as d13g4. Your recommendation to set CONDA_SHLVL="0" in the startup script solved my problem. Thank you.

richardstevenhack commented 4 months ago

I'll say what I always say for python projects that want to run on Linux: 1) There is no "one Linux". Either say that you only support Ubuntu or Red Hat or whatever, or don't bother setting up a script which will inevitably fail on most distros. This is the reality of Linux. 2) Some Linux distros control the Python environment. Not everyone has a virtual environment setup ready to go and an install script that tries to install one will fail. So either use pipx or see 3). 3) Do a Flatpak, an AppImage or a snap package (in that order of preference). 4) Failing 3), do a Docker image (although Docker Desktop doesn't run on many Linux distros, so command line Docker is a PITA.)