cocktailpeanut / dalai

The simplest way to run LLaMA on your local machine
https://cocktailpeanut.github.io/dalai
13.09k stars 1.42k forks source link

Unable to install LLaMa on Windows 11 using Node.js 18.15.0 and npm 9.6.1 #24

Open sky10p opened 1 year ago

sky10p commented 1 year ago

Description

I'm trying to install LLaMa on my Windows 11 machine using Node.js 18.15.0 and npm 9.6.1 installed through Volta. However, when I run the command npx dalai llama, I receive the following error:

Need to install the following packages:
  dalai@0.0.13
Ok to proceed? (y)
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\sky10\\AppData\\Local\\npm-cache\\_npx\\3c737cbb02d79cc9\\node_modules',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\sky10\AppData\Local\npm-cache\_npx\3c737cbb02d79cc9\node_modules\engine.io-client\node_modules'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\sky10\\AppData\\Local\\npm-cache\\_npx\\3c737cbb02d79cc9\\node_modules\\engine.io-client\\node_modules'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]

I have tried running the command with administrator privileges, as well as manually deleting the directory mentioned in the error message, but the issue persists. I have also tried deleting the node_modules folder in my project directory and reinstalling, but that did not solve the problem either.

Can someone please help me resolve this issue so I can successfully install and use LLaMa?

Environment:

Thanks in advance for your help!

JustAHippo commented 1 year ago

doesn't look like this supports Windows yet! So far, I downloaded the model, have it converted and quantized and can interact with it via the llama cpp but this tool doesn't appear to work with Windows nicely

sky10p commented 1 year ago

Alright, I'll keep that in mind. Is it only compatible with Mac, or would it work with Linux too?

chuSS commented 1 year ago

i have another error. Windows 11 22H2

C:\proj\dalai>npx dalai llama
exec: git clone https://github.com/ggerganov/llama.cpp.git C:\Users\chuss\llama.cpp in undefined
C:\proj\dalai\node_modules\node-pty\lib\windowsPtyAgent.js:75
            term = this._ptyNative.startProcess(file, cols, rows, debug, this._generatePipeName(), conptyInheritCursor);
                                   ^

Error: File not found:
    at new WindowsPtyAgent (C:\proj\dalai\node_modules\node-pty\lib\windowsPtyAgent.js:75:36)
    at new WindowsTerminal (C:\proj\dalai\node_modules\node-pty\lib\windowsTerminal.js:50:24)
    at Object.spawn (C:\proj\dalai\node_modules\node-pty\lib\index.js:28:12)
    at C:\proj\dalai\index.js:267:30
    at new Promise (<anonymous>)
    at Dalai.exec (C:\proj\dalai\index.js:261:12)
    at Dalai.install (C:\proj\dalai\index.js:120:30)
    at Object.<anonymous> (C:\proj\dalai\bin\cli.js:37:17)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)

Node.js v18.14.1

folder C:\Users\chuss\llama.cpp empty

espio999 commented 1 year ago

Did you perform with admin privileges?

-->"[Error: EPERM: operation not permitted,"

This message suggests to use "run as administrator", I think. Run a terminal with "run as administrator" and try again.

sky10p commented 1 year ago

Did you perform with admin privileges?

-->"[Error: EPERM: operation not permitted,"

This message suggests to use "run as administrator", I think. Run a terminal with "run as administrator" and try again.

Yes, I did it, but I didn't work, I didn't receive any logs of the command.

sky10p commented 1 year ago

I have tried again the command, and it doesn't do anything:

$ npx dalai llama
Need to install the following packages:
  dalai@0.2.0
Ok to proceed? (y)

I type the y and enter, but it does not happen anything

CapsulE07 commented 1 year ago

I met the same issue as you, and also cant run the project.

rearming commented 1 year ago

FIXED: I'm actually not a js user and just forgot to npm install 🫡 maybe some of the folks don't understand that either

I have Mac and no effect either.

Screenshot 2023-03-20 at 20 04 54
bostankhan6 commented 1 year ago

Did anyone find a solution to this problem? Mine is occurring on windows 10

scsp85 commented 1 year ago

I had figured it out eventually and your mileage may vary. For windows 11 here are some things I did differently.

(Assuming you following all the instructions)

  1. Install the Windows SDK
  2. Run NPM instead of NPX for the first installation command.
  3. Using the Microsoft Store install Python 3.10, and make sure the command “python3” is in Path. (It did this for me)

I did a few other things as I tried to figure it out, but I think those three pieces are what fixed it for me.

larrybird1 commented 1 year ago

same problem, can not install in windows 11

C:\Windows\System32>npx dalai llama install 7B Need to install the following packages: dalai@0.3.1 Ok to proceed? (y) y npm WARN cleanup Failed to remove some directories [ npm WARN cleanup [ npm WARN cleanup 'C:\Users\Administrator\AppData\Local\npm-cache\_npx\3c737cbb02d79cc9\node_modules', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\Administrator\AppData\Local\npm-cache_npx\3c737cbb02d79cc9\node_modules\dalai'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'C:\Users\Administrator\AppData\Local\npm-cache\_npx\3c737cbb02d79cc9\node_modules\dalai' npm WARN cleanup } npm WARN cleanup ] npm WARN cleanup ]