text-generation-webui
text-generation-webui copied to clipboard
"Conda is not installed." even after installed with start_windows.bat
Describe the bug
python webui.py
Just prints
Conda is not installed. Exiting...
And quit.
I opened up webui.py to see how it works. This line simply doesn't work:
C:\Users\{user}\github\oobabooga_windows\installer_files\conda\condabin\conda.bat activate "C:\Users\{user}\github\oobabooga_windows\installer_files\env" >nul && conda
conda: The term 'conda' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
conda.bat activate executed successfully, but even after that, conda is still not an executable command, so it won't work.
Is there an existing issue for this?
- [X] I have searched the existing issues
Reproduction
./start_windows.bat
Screenshot
No response
Logs
Conda is not installed. Exiting...
System Info
Windows 10
GPU etc doesn't matter. I can't even get to the step that needs GPU.
Additionally, on my end, even after running start-windows.bat, I get Conda is not installed. Exiting... both after running the installation for the first time, and running it again. It's strange, because Conda is there, within the installer files folder, but it doesn't seem to want to detect it. And last time I tried the manual installation with conda I got lost because it's all a mess and there was like 10 different condas so I am just not going to even try.
I also run into this issue and am unable to run the webui because of it.
I also have been running into this issue as well the entire time
Im running into this same issue, but on a mac. Conda is installed and updated but oobab refuses to see it
I also had this issue, even when I had conda with previous versions of web ui. Running the start script in powershell instead of double click opening it helped. It might have been due to me running conda init powershell before, but not sure.
Came to this conclusion when I removed the check for conda that exits and then using _conda.exe instead of conda.bat (def run_cmd in webui.py) as that told me to run init. Maybe this will help someone.
It looks like the Miniconda installation failed for some reason and is unable to open the environment with conda. Please try deleting all files, installing again with start_windows.bat, and pasting the full installation log here
It looks like the Miniconda installation failed for some reason and is unable to open the environment with conda. Please try deleting all files, installing again with
start_windows.bat, and pasting the full installation log here
No clue what you mean with installation log, but uhh here's what the terminal (I call every commandline a terminal) sez
Downloading Miniconda from https://repo.anaconda.com/miniconda/Miniconda3-py310_23.1.0-1-Windows-x86_64.exe to O:\oobabooga_windows\installer_files\miniconda_installer.exe
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 53.1M 100 53.1M 0 0 60.8M 0 --:--:-- --:--:-- --:--:-- 60.8M
Installing Miniconda to O:\oobabooga_windows\installer_files\conda
Miniconda version:
conda 22.11.1
Packages to install:
Retrieving notices: ...working... urllib3\connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'repo.anaconda.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
urllib3\connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'repo.anaconda.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
urllib3\connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'repo.anaconda.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
done
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: O:\oobabooga_windows\installer_files\env
added / updated specs:
- python=3.10
The following packages will be downloaded:
package | build
---------------------------|-----------------
libffi-3.4.4 | hd77b12b_0 113 KB
openssl-1.1.1t | h2bbff1b_0 5.5 MB
pip-23.0.1 | py310haa95532_0 2.8 MB
python-3.10.11 | h966fe2a_2 15.8 MB
setuptools-66.0.0 | py310haa95532_0 1.2 MB
sqlite-3.41.2 | h2bbff1b_0 894 KB
tzdata-2023c | h04d1e81_0 116 KB
wheel-0.38.4 | py310haa95532_0 83 KB
xz-5.4.2 | h8cc25b3_0 592 KB
------------------------------------------------------------
Total: 27.0 MB
The following NEW packages will be INSTALLED:
bzip2 pkgs/main/win-64::bzip2-1.0.8-he774522_0
ca-certificates pkgs/main/win-64::ca-certificates-2023.01.10-haa95532_0
libffi pkgs/main/win-64::libffi-3.4.4-hd77b12b_0
openssl pkgs/main/win-64::openssl-1.1.1t-h2bbff1b_0
pip pkgs/main/win-64::pip-23.0.1-py310haa95532_0
python pkgs/main/win-64::python-3.10.11-h966fe2a_2
setuptools pkgs/main/win-64::setuptools-66.0.0-py310haa95532_0
sqlite pkgs/main/win-64::sqlite-3.41.2-h2bbff1b_0
tk pkgs/main/win-64::tk-8.6.12-h2bbff1b_0
tzdata pkgs/main/noarch::tzdata-2023c-h04d1e81_0
vc pkgs/main/win-64::vc-14.2-h21ff451_1
vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
wheel pkgs/main/win-64::wheel-0.38.4-py310haa95532_0
xz pkgs/main/win-64::xz-5.4.2-h8cc25b3_0
zlib pkgs/main/win-64::zlib-1.2.13-h8cc25b3_0
Downloading and Extracting Packages
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate O:\oobabooga_windows\installer_files\env
#
# To deactivate an active environment, use
#
# $ conda deactivate
Conda is not installed. Exiting...
Done!
Press any key to continue . . .
ye idk
@NordGeit thanks, that's what I was looking for. Very strange that this happens. If you open cmd_windows.bat, does it give you the same error?
@NordGeit thanks, that's what I was looking for. Very strange that this happens. If you open
cmd_windows.bat, does it give you the same error?
(O:\oobabooga_windows\installer_files\env) O:\oobabooga_windows>
is what it displays, ready for typing in the command to destroy the world or something
I have the same issue. As far as I can tell it fails on this line of bat file:
call python webui.py, and looking at the contents of webui.py, it fails in check_env
I have older script based on micromamba, and that one works without problems.
I found a way to get it running. you just need to add the folder path containing the file conda.bat 'C:\oobabooga_windows\installer_files\conda\condabin' to PATH in environment variable (I added to system environment variable)
The reason for this is that when running the webui.py file, it can't find the conda command.
This can be checked by typing 'where conda' and 'conda --version' in the window created by 'cmd_windows.bat'.
Restarting my PC seems to have solved this issue. Keep in mind that I first tried adding conda to PATH, as well as reinstalling the entire application.
This works, but it only does because of the >null && conda part of the cmd. It's a temp workaround. I just started looking at this installer today, and have identified a few problem points.
Another issue/bug is that there is no easy way to disable miniconda installation, when conda or anaconda is already installed on windows. The fixes for this are simple, and could be resolved, just by checking if conda is already available in the environment the script is running from by running where conda followed by findstr.
I'd like get this running, but have not enough time to spend on this today. But in the meantime,I'm doing a manual install instead and skipping the installer.
Updated:
Or the scripts can check for these env variables to check if it's already running in a conda env?
(base) C:\Users\User>set conda
CONDA_DEFAULT_ENV=base
CONDA_EXE=C:\Users\User\miniconda3\Scripts\conda.exe
CONDA_PREFIX=C:\Users\User\miniconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=C:\Users\User\miniconda3\python.exe
CONDA_SHLVL=1
i did add the PATH, i did restart pc, and still :
(c:\OOBA\installer_files\env) c:\AI\CHAT\OOBA>conda --ver conda 23.3.1
(c:\OOBA\installer_files\env) c:\AI\CHAT\OOBA>start_windows Conda is not installed. Exiting... Press any key to continue . . .
so I finally found the basic noobish solution, which worx like a champ... in 2846
well no one replied if anyone had similar problem change webui.py
check_env():
#conda_exist = run_cmd("conda", environment=True, capture_output=True).returncode == 0
conda_exist = True
This issue has been closed due to inactivity for 6 weeks. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.
The issue still persist and is not fixed. Note that auto1111 does not have such problem, so the installer is doing something very interesting and not exactly correct.
The issue lies either within start_window.bat or one_click.py, one of them is doing something wrong.
With a system-wide python install, a reliable way to install guaranteed set of packages is venv. For example, something like this:
call venv/Scripts/activate.bat
run.py
This assumes that venv was previously initialized. For example, this is how I do it for one of my projects:
python -m venv venv
call venv/Scripts/activate.bat
pip list
pip3 install torch torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install numpy
pip install omegaconf
pip install soundfile
pip list
exit
Both of those are cmd files.
Another solution if you don't want to edit the webui.py which could cause git pull upgrade issues due to edited code or adding the directory to your path which could mess up other conda projects, just do the following:
Copy _conda.exe from installer_files\conda to the root directory and rename it to conda.exe
Another solution if you don't want to edit the webui.py which could cause git pull upgrade issues due to edited code or adding the directory to your path which could mess up other conda projects, just do the following:
Copy _conda.exe from installer_files\conda to the root directory and rename it to conda.exe
Worked like a charm. Thank you! After all that, such an easy fix!