dalai
dalai copied to clipboard
Issue with Dalai installation and serve
Hi everyone, I'm trying to run Dalai with the Llama 7B model following the instructions. I have tried running the following commands:
npx dalai llama install 7B
npx dalai serve
The result is that my computer prompts "Need to install the following packages: [email protected]", I selected yes but nothing happened. I have also tried troubleshooting the issue as described in Step 2.2 of the instructions, but with no luck. Currently, I'm using Python 3.10 and NodeJs v18 on a MacBook Air with an M1 Silicon CPU.
Has anyone encountered this issue before? I would appreciate any help.

same here. not sure what went wrong. (on WSL2, node v18, python 3.8)
Same windows non wsl node 18.16 python 3.10.8
Hi, i had a similar issue. it turned out I did not have make g++ was necessary for the installation. For RHEL yum groupinstall 'Development Tools'
installed it, sudo apt install g++
should work for Ubuntu. I don't know how to install it on WSL/Windows, but you should be able to find it online. Just search for "Install g++ [your os]". Hope this helps! And I think it would be a good idea for the dev to mention the dependency somewhere in the installation/troubleshooting section, could help with further issues.
I did all the commands, including troubleshoot, but same result as @nsknet . When I try to install dalai:
npm i -g dalai
npm ERR! code 1
npm ERR! path /Users/user/.nvm/versions/node/v19.8.1/lib/node_modules/dalai
npm ERR! command failed
npm ERR! command sh -c node setup
npm ERR! mkdir /Users/user/dalai
npm ERR! exec: pip3 install --user virtualenv in undefined
npm ERR! pip3 install --user virtualenv
npm ERR! exit
npm ERR! Plugins directory not specified, please pass your zsh plugins directory as a parameter.
npm ERR! # EXIT { exitCode: 1, signal: 0 }
npm ERR! exec: pip3 install virtualenv in undefined
npm ERR! pip3 install virtualenv
npm ERR! exit
npm ERR! Plugins directory not specified, please pass your zsh plugins directory as a parameter.
npm ERR! # EXIT { exitCode: 1, signal: 0 }
npm ERR! exec: pip install --user virtualenv in undefined
npm ERR! pip install --user virtualenv
npm ERR! exit
npm ERR! Plugins directory not specified, please pass your zsh plugins directory as a parameter.
npm ERR! # EXIT { exitCode: 1, signal: 0 }
npm ERR! exec: pip install virtualenv in undefined
npm ERR! pip install virtualenv
npm ERR! exit
npm ERR! Plugins directory not specified, please pass your zsh plugins directory as a parameter.
npm ERR! # EXIT { exitCode: 1, signal: 0 }
npm ERR! Error Error: cannot install virtualenv
npm ERR! at Dalai.setup (/Users/user/.nvm/versions/node/v19.8.1/lib/node_modules/dalai/index.js:341:15)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2023-03-19T16_43_16_842Z-debug-0.log
I'm getting this too, but was able to see more details by running npm i -g dalai
for me, it then complains about not being about not being able to install some python dependency (sentencepiece).
someone in another thread suggested changing something in pyvenv.cfg -
include-system-site-packages = true
which did not help, because every time pyvenv.cfg
is recreated it's set to false?
I tried to install sentencepiece
manually from python in the ~/dalai
folder, which failed with some error that directory "sentencepiece" already exists.
https://github.com/cocktailpeanut/dalai/issues/108#issuecomment-1475317800
This seems quite intrusive on the Python front. Perhaps the author can just make the Python steps available separately, so I can make my own decisions about what virtual environments (pyenv/conda/etc) to use.
Running brew install cmake
seemed to fix up this issue on my mac for me.
Current versions:
Node v18.15.0
and Python 3.11.1
^^ fixes the problem for me
apt-get install cmake g++
fixed the problem for me on ubuntu 20
Running
brew install cmake
seemed to fix up this issue on my mac for me.Current versions:
Node v18.15.0
andPython 3.11.1
Thanks, this worked for me. Node v18.15.0 and Python v3.11.2
Running
brew install cmake
seemed to fix up this issue on my mac for me.Current versions:
Node v18.15.0
andPython 3.11.1
fixed for me! thanks