[GH-ISSUE #28] Variable CONDA_PATH is uninitialized #4

Closed
opened 2026-10-15 18:06:05 +00:00 by bsakaguchi · 5 comments
Owner

Originally created by @ostr00000 on GitHub (Dec 28, 2023).
Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Launcher/issues/28

Originally assigned to: @Frityet on GitHub.

OS: Linux (Ubuntu 23.10)

  1. If variable CONDA_PATH is set, then it is checked if path is (correct)[github.com/SillyTavern/SillyTavern-Launcher@8ec79f0783/install.sh (L82)].
    But if the variable is not set, then there is an error when installing conda. The first error comes from miniconda installer. The error complain about missing argument for -p.

    As a workaround, I changed code to this:

    if [ -n "$CONDA_PATH" ]; then
        CONDA_PATH="$(find_conda)"
    else
        SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
        CONDA_PATH="$SCRIPT_DIR/miniconda"
        echo "CONDA_PATH set to $CONDA_PATH"
    fi
    
  2. I think that another bad thing is not aborting when something goes wrong. For example, an error when installing conda does not stop further processing, which results in another errors. I propose setting set -e flag. Or at least manually check errors. This is important especially when a console is cleaned, because then no error is seen by the user. WARNING: there will be more errors from command like git (for already cloned repos), mkdir (xtts folder is created at two places), etc.

  3. After successful conda installation, the next error is miniconda_path. Probably this should be changed to CONDA_PATH. Maybe this is related to launcher.sh, but the docs say that install.sh script should be run first.

  4. Also, as far as I know git remember executable flag, so maybe these permissions should be added to git instead of explicitly in the run command (readme: chmod +x install.sh && ./install.sh). Actually, install.sh script has already this permission, but launcher.sh is missing that.

Originally created by @ostr00000 on GitHub (Dec 28, 2023). Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Launcher/issues/28 Originally assigned to: @Frityet on GitHub. OS: Linux (Ubuntu 23.10) 1. If variable `CONDA_PATH` is set, then it is checked if path is (correct)[https://github.com/SillyTavern/SillyTavern-Launcher/blob/8ec79f07837932ebe123e9b4f68ef251b303672b/install.sh#L82]. But if the variable is not set, then there is an error when installing conda. The first error comes from [miniconda installer](https://github.com/SillyTavern/SillyTavern-Launcher/blob/8ec79f07837932ebe123e9b4f68ef251b303672b/install.sh#L317). The error complain about missing argument for `-p`. As a workaround, I changed code to this: ```bash if [ -n "$CONDA_PATH" ]; then CONDA_PATH="$(find_conda)" else SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) CONDA_PATH="$SCRIPT_DIR/miniconda" echo "CONDA_PATH set to $CONDA_PATH" fi ``` 2. I think that another bad thing is not aborting when something goes wrong. For example, an error when installing `conda` does not stop further processing, which results in another errors. I propose setting `set -e` [flag](https://stackoverflow.com/a/3474556). Or at least manually check errors. This is important especially when a console is cleaned, because then no error is seen by the user. WARNING: there will be more errors from command like `git` (for already cloned repos), `mkdir` (`xtts` folder is created at two places), etc. 3. After successful `conda` installation, the next error is `miniconda_path`. Probably this should be changed to `CONDA_PATH`. Maybe this is related to `launcher.sh`, but the docs say that `install.sh` script should be run first. 4. Also, as far as I know `git` remember executable flag, so maybe these permissions should be added to git instead of explicitly in the run command (readme: `chmod +x install.sh && ./install.sh`). Actually, `install.sh` script has already this permission, but `launcher.sh` is missing that.
Author
Owner

@Frityet commented on GitHub (Jan 1, 2024):

Thanks for the info! I will debug

<!-- gh-comment-id:1873482531 --> @Frityet commented on GitHub (Jan 1, 2024): Thanks for the info! I will debug
Author
Owner

@deffcolony commented on GitHub (Mar 28, 2024):

@ostr00000 Please let me know if you are still encountering any issues with the install.sh script. There have been several updates to the script in recent months, including fixes for the installation process of Miniconda, among other improvements.

<!-- gh-comment-id:2025515835 --> @deffcolony commented on GitHub (Mar 28, 2024): @ostr00000 Please let me know if you are still encountering any issues with the install.sh script. There have been several updates to the script in recent months, including fixes for the installation process of Miniconda, among other improvements.
Author
Owner

@ostr00000 commented on GitHub (Mar 28, 2024):

installation

I installed a new, clean environment using commands in README - the installation works perfectly, successfully finished. 🎉

post installation

I have one simple error:
When installation is finished, there is a question: Start the launcher now? [Y/n]. I answered y and surprisingly nothing happened. The installator clears the screen, so no error is available, but I have some "magic" script, that redirect all terminal output to a log file, so I searched there for this error. The error is: chmod: cannot access 'launcher.sh': No such file or directory (line in code).

I believe "$0" is ./lanucher.sh, so "$(dirname "$0")" is . and executing cd changes nothing.
The current path at this point of program execution is invalid, because at https://github.com/SillyTavern/SillyTavern-Launcher/blob/main/install.sh#L467 we changed the current path.
I suggest using a global variable script_path (declaration line).

Also, please note that if user do not chose Start the launcher now, there are still missing executive permissions for launcher.sh (so the 4th point from this issue is not solved).

launching

After fixing permissions and running launcher, I selected 1. Start SillyTavern, I got blink of terminal window - there is an error, but terminal is closing immediately, so it is hard to debug.
I got npm error: npm ERR! Invalid comparator: npm:dry-uninstall -
Updating npm to a newer version solved this problem.

I have a question: python and its dependencies are managed by conda, but what about npm? Do I need to install it manually on the system? Is there a requirement for a specific version? I cannot find any info about it in docs.

<!-- gh-comment-id:2026155634 --> @ostr00000 commented on GitHub (Mar 28, 2024): ## installation I installed a new, clean environment using commands in README - the installation works perfectly, successfully finished. :tada: ## post installation I have one simple error: When installation is finished, there is a question: `Start the launcher now? [Y/n]`. I answered `y` and surprisingly nothing happened. The installator clears the screen, so no error is available, but I have some "magic" script, that redirect all terminal output to a log file, so I searched there for this error. The error is: `chmod: cannot access 'launcher.sh': No such file or directory` ([line in code](https://github.com/SillyTavern/SillyTavern-Launcher/blob/471fb15041ce31a7a2584277c9a9dba3605d7e79/install.sh#L520)). I believe `"$0"` is `./lanucher.sh`, so `"$(dirname "$0")"` is `.` and executing `cd` changes nothing. The current path at this point of program execution is invalid, because at https://github.com/SillyTavern/SillyTavern-Launcher/blob/main/install.sh#L467 we changed the current path. I suggest using a global variable `script_path` ([declaration line](https://github.com/SillyTavern/SillyTavern-Launcher/blob/471fb15041ce31a7a2584277c9a9dba3605d7e79/install.sh#L125)). Also, please note that if user do not chose `Start the launcher now`, there are still missing executive permissions for `launcher.sh` (so the 4th point from this issue is not solved). ## launching After fixing permissions and running launcher, I selected `1. Start SillyTavern`, I got blink of terminal window - there is an error, but terminal is closing immediately, so it is hard to debug. I got `npm` error: `npm ERR! Invalid comparator: npm:dry-uninstall` - [Updating npm](https://github.com/nodesource/distributions/blob/master/README.md#using-ubuntu) to a newer version solved this problem. I have a question: python and its dependencies are managed by conda, but what about `npm`? Do I need to install it manually on the system? Is there a requirement for a specific version? I cannot find any info about it in docs.
Author
Owner

@deffcolony commented on GitHub (Mar 30, 2025):

@ostr00000 Okay once again please let me know if you are still encountering any issues with the install.sh script. Recently there was a massive update for the launcher that should have fixed the errors you experienced

<!-- gh-comment-id:2764715136 --> @deffcolony commented on GitHub (Mar 30, 2025): @ostr00000 Okay once again please let me know if you are still encountering any issues with the install.sh script. Recently there was a massive update for the launcher that should have fixed the errors you experienced
Author
Owner

@ostr00000 commented on GitHub (Mar 31, 2025):

I tested installation using commands from README.md. There is no error -> ✅.

Also, please note that I change my operating system to Fedora 41, so I am not able to reproduce original issue.

<!-- gh-comment-id:2767319902 --> @ostr00000 commented on GitHub (Mar 31, 2025): I tested installation using commands from `README.md`. There is no error -> ✅. Also, please note that I change my operating system to Fedora 41, so I am not able to reproduce original issue.
Sign in to join this conversation.
No description provided.