Windows Build would be nice too
Closed this issue · 5 comments
Me too!
Getting this when trying in windows terminal preview an after
$ go install github.com/sammcj/gollama@latest
$ gollama
Loading config from: .config\gollama\config.json
Error initializing logging: open /.config/gollama/gollama.log: The system cannot find the path specified.
Hey, This tool is designed for Linux/macOS. If there's someone that has a simple workaround for windows and wants to submit a PR I'm happy to have a look at it but in general I don't have plans to support Windows.
I got it to install on Windows 11. Here is what I did after debugging:
- Install Miniconda and Git, or already installed.
- Open Git Bash (needed for the Unix commands
make build
uses later) - Make a conda environment:
conda create -n gollama
- Activate the environment:
conda activate gollama
- Install go and make into the env:
conda install -c conda-forge go make
- Change folders to where you want to install Gollama.
git clone https://github.com/Gaurav-Gosain/gollama.git
cd gollama
go get
- Only if you've changed the default location of your conda environments, set GOROOT to where Go is installed in Miniconda:
export GOROOT=/path/to/your/conda/envs/gollama/go
- Edit
/gollama/config/config.go
and add this to the beginning of the LoadConfig() function, currently on about line 72, so it can properly find your Windows user home directory:
// Determine the home directory based on the OS
homeDir := os.Getenv("HOME")
if homeDir == "" {
homeDir = os.Getenv("USERPROFILE") // For Windows
}
- Edit the viper.AddConfigPath line a few lines down to use the new homeDir variable:
viper.AddConfigPath(filepath.Join(homeDir, ".config", "gollama"))
make build
- Start Gollama in Git Bash:
./gollama
(although the TUI is quite off in Git Bash) - or, Start Gollama in command prompt:
gollama
. The TUI looks much better here.
I think that got it running for me on Windows. Hope it helps. Of course, you can use your favorite LLM to debug if it doesn't work for you.
Thanks for sharing @Jonseed!
FYI - It shouldn't need anything to do with conda - conda is for Python applications.
I'll look into adding the homeDir check for windows shortly :)
Sure! Conda was just to easily install and isolate the go
and make
packages. I know you can install go in Windows. You can install make with chocolatey, and probably other methods, but that seemed like more work than just using conda which I was already used to.