kevkid / gguf_gui

MIT License
84 stars 15 forks source link

ModuleNotFoundError: No module named 'llama_cpp' #7

Closed skyline9394 closed 2 weeks ago

skyline9394 commented 1 month ago

(base) sky@sky-VMware-Virtual-Platform:~/Desktop$ cd llama.cpp (base) sky@sky-VMware-Virtual-Platform:~/Desktop/llama.cpp$ streamlit run main.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501 Network URL: http://192.168.192.130:8501

2024-10-26 17:02:45.326 Uncaught app exception Traceback (most recent call last): File "/home/sky/anaconda3/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "/home/sky/anaconda3/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec exec(code, module.dict) File "/home/sky/Desktop/llama.cpp/main.py", line 8, in import llama_cpp ModuleNotFoundError: No module named 'llama_cpp'

ComputerGuy-github commented 3 weeks ago

I think you have to install llama.cpp

skyline9394 commented 3 weeks ago

Easy installation:

./run.sh This should pull the repos and install the requirements. You will need llama.cpp build using make or cmake. The script above will try to do that.

After the initial run you can just run:

streamlit run main.py

what im missing here it dont say install anything?

ComputerGuy-github commented 3 weeks ago

Oh, Im not sure how you can fix that, I am not familiar with streamlit apps, I just saw the python error and came to a conclusion too quickly.

kevkid commented 2 weeks ago

fixed, have updated the run.sh.

you needed to do pip install llama-cpp-python

if you get build errors it seems like gcc 11 will fix that

sudo apt install gcc-11 g++-11 build-essential -y
CXX=g++-11  CC=gcc-11 pip install llama-cpp-python

https://github.com/oobabooga/text-generation-webui/issues/1534

kevkid commented 2 weeks ago

If you have further issues, feel free to open a new ticket