Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXED] Error while installing python package: llama-cpp-python #1079

Open
Fthkrks opened this issue Jan 12, 2025 · 0 comments
Open

[FIXED] Error while installing python package: llama-cpp-python #1079

Fthkrks opened this issue Jan 12, 2025 · 0 comments
Labels
fix Fix something that isn't working as expected

Comments

@Fthkrks
Copy link

Fthkrks commented Jan 12, 2025

Describe the bug

When I type this code into the terminal "pip install -e '.[dev]'" I get an error that fails . Now I will tell you how I solved this error.

If you use Ubuntu 22.04 LTS

The error message suggests missing build dependencies for compiling the C++ part of llama-cpp-python. Luckily, Ubuntu provides a convenient package to install these:

sudo apt install build-essential

This command will install gcc (C compiler), g++ (C++ compiler), and other necessary tools for building C/C++ projects.

After this try this command again:

pip install llama-cpp-python

If you use Windows

I would like to share here the solution that I found on stackoverflow and tried on windows and it worked.

You need to install the desktop c++ block with visual studio to get cmake properly installed.Open the Visual Studio Installer and click Modify, then check Desktop development with C++ and click Modify to start the install. I also recommend the Windows 10 SDK. https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170 https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ After that, !pip install llama-cpp-python should build just fine.

Note

The first issue I shared was how I solved the problem I encountered, I hope it helped.

@Fthkrks Fthkrks added the fix Fix something that isn't working as expected label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix something that isn't working as expected
Projects
None yet
Development

No branches or pull requests

1 participant