SilasMarvin / lsp-ai

LSP-AI is an open-source language server that serves as a backend for AI-powered functionality, designed to assist and empower software engineers, not replace them.
MIT License
1.82k stars 55 forks source link

Problème d'installation sur Windows 11 : "cargo install lsp-ai -F llama_cpp" #26

Open patriote2047 opened 2 weeks ago

patriote2047 commented 2 weeks ago

En regardant le Tuto de : AICodeKing pour installer LSP-AI pour Ollama sur Windows 11. Je me suis retrouvé avec ces erreurs : CARGO-PROJETS - Visual Studio Code J'ai donc un peu cherché et j'ai trouvé !

🥇 🥇 🥇 INSTALLER sur Windows 11 & Python 3.12 & Conda 🥇 🥇 🥇

PRE-INSTALLATION SYSTEME : Python MiniConda Installer Microsoft C++ Build Tools Installer Rust Installer Visual Studio Code Installer LLVM 18.1.5 💯 DECLARER : COUPABLE

Rajouter les variables ENV au système pour llama.cpp.

**INSTALLATION de LSP-AI :*** Créer un ENV conda & l'activer. cloner le Depot. Se déplacer dans le dossier créé. Vérifier que Cargo est bien installer. (Redémarrer si il y a un probléme) Lancer la commande d'installation.

### Créer un ENV conda & l'activer.
conda create -n lsp-ai python=3.12 -y
conda activate lsp-ai

### cloner le Depot.
git clone https://github.com/SilasMarvin/lsp-ai.git

### Se déplacer dans le dossier créé.
cd lsp-ai

### Vérifier que Cargo est bien installer.
cargo --version 

###### Si OK ! alors on continu...
### Lancer la commande d'installation. 
cargo install lsp-ai -F llama_cpp

# Installation Terminée.

Nouvelle Réponse 👍

toml - CARGO-PROJETS - Visual Studio Code 👍 👍 👍 Bonne Installation...

Installer LSP-AI pour VScode

LSP-AI pour VScode Ollama

Ps: l'installation a été faite avec un .env dans 'VisualStudio" mais il n'y ne devrait pas y avoir de soucis avec conda.

Bonus :

  1. Le Plugin dans VScode.
  2. Configuration pour Ollama.
SilasMarvin commented 2 weeks ago

Thanks for sharing!

My primary language is English, so I'm not follow everything 100%. Please correct me where I'm wrong:

If I understand correctly, the install when running cargo install lsp-ai -F llama_cpp did not work for you, so you created a conda environment, cloned the repo, and then installed it.

I don't know what dependencies you will need with Windows to make the install work, but I'm pretty sure cloning the repo didn't do anything. When you run cargo install lsp-aI -F llama_cpp it installs from crates.io. If you want to install it from the local repository you have to run cargo install --path . -F llama_cpp.

I guess I'm confused why you created a conda environment with Python? It seems that it just happened to work because the Conda environment installed some missing libraries, I don't think that should be required to make the install work.

Did you look into installing the missing clang.ddl and libclang.dll libraries, or did you already have them and try setting the LIBCLANG_PATH env variable?

If there are some additional steps to getting it working with Windows I would like to add it to the Wiki. Thanks for pointing this out!

patriote2047 commented 1 week ago

Salut, oui, j'ai suivi la procédure. J'ai remarqué que dans les fichiers d'installation des dépendances (requirements, etc...), les dépendances qu'on installe, propose souvent la version ^= et c'est souvent là que je dois corriger en == pour éviter les problèmes. Exemple dans d'autre projet : "numpy" est passé en version 2 récemment, il provoque des bugs d'installation, il faut repasser en version 1. pour réussir l'installation.
Bonne journée à vous...