dalai icon indicating copy to clipboard operation
dalai copied to clipboard

Issue with Dalai installation and serve

Open nsknet opened this issue 1 year ago • 9 comments

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.

image

nsknet avatar Mar 19 '23 05:03 nsknet

same here. not sure what went wrong. (on WSL2, node v18, python 3.8)

ljhskyso avatar Mar 19 '23 07:03 ljhskyso

Same windows non wsl node 18.16 python 3.10.8

ilazarte avatar Mar 19 '23 07:03 ilazarte

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.

KDEFan avatar Mar 19 '23 13:03 KDEFan

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

fysp11 avatar Mar 19 '23 16:03 fysp11

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.

Madd0g avatar Mar 20 '23 11:03 Madd0g

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.

opyate avatar Mar 20 '23 14:03 opyate

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

KabakaWilliam avatar Mar 20 '23 21:03 KabakaWilliam

^^ fixes the problem for me

Madd0g avatar Mar 21 '23 03:03 Madd0g

apt-get install cmake g++ fixed the problem for me on ubuntu 20

corgan2222 avatar Mar 21 '23 12:03 corgan2222

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

Thanks, this worked for me. Node v18.15.0 and Python v3.11.2

logosfabula avatar Apr 04 '23 12:04 logosfabula

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

fixed for me! thanks

heikou avatar Apr 07 '23 07:04 heikou