Imago
Imago

Reputation: 501

Resolving python version conflicts & bugs programmatically?

Is there a programmatic way of searching for a working python project setup? In the first step all necessary python dependencies would be installed, then some code would be executed and in case it does not work, a different combination of python packages would be tried.

In my specific case: I started with a non-functional installation guide and then had to resolve the problem via trial and error. Manual trial and error however should never be the approach for code that goes in production. That's why I am looking for the right and smart way to do things:

As an example: I followed the installation guide of llama-index and tried running the following code:

from llama_index.embeddings.huggingface import HuggingFaceEmbedding
embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-small-en-v1.5")

This did not work and it's also well known, that there are problems during installation. This has also been stated several times on this platform, e.g. here.

I resolved my specific problem by trial and error using the package versions in the requirements.txt below.

languagemodels==0.20.0
llama_index==0.11.10
matplotlib==3.9.2
mediapipe==0.10.15
numpy==2.1.1
openai==1.45.1
pandas==2.2.2
scikit_learn==1.5.2
seaborn==0.13.2
tensorflow==2.17.0
tokenizers==0.20.0
torch==2.4.1

Upvotes: 0

Views: 29

Answers (0)

Related Questions